Hello,
I created a brand new project using the python script and added just five lines of code to main that print out a couple of lines to the serial monitor. The output I am getting does not look right (the float is not showing up). I tried this in some other situations and every time I try to PrintLine a float, it does not work. Sometimes instead of nothing it looks like it is replacing the %f with unintialized memory. What am I doing wrong?
Thanks!
---- Opened the serial port COM3 ----
Print an int value: 1341
Print a float value:
Here is the source:
#include “daisy_pod.h”
#include “daisysp.h”using namespace daisy;
using namespace daisysp;DaisyPod hw;
void AudioCallback(AudioHandle::InputBuffer in, AudioHandle::OutputBuffer out, size_t size)
{
hw.ProcessAllControls();
for (size_t i = 0; i < size; i++)
{
out[0][i] = in[0][i];
out[1][i] = in[1][i];
}
}int main(void)
{
hw.Init();
hw.SetAudioBlockSize(4); // number of samples handled per callback
hw.SetAudioSampleRate(SaiHandle::Config::SampleRate::SAI_48KHZ);hw.seed.StartLog(true);
int myint = 1341;
float myfloat = 1.234f;
hw.seed.PrintLine(“Print an int value: %d”, myint);
hw.seed.PrintLine(“Print a float value: %f”, myfloat);hw.StartAdc();
hw.StartAudio(AudioCallback);
while(1) {}
}