I have a patch. I have the DaisySP installed and setup. I have the DaisyExamples. I have a simple program running and flashed. It’s working but the oled is not displays a variable value. I’m reading a control knob value but oled doesn’t display the value.
Here is a snippet from the while loop in main(). The value of formula_index
displays but the value of speed
does not display.
patch.display.Fill(false);
patch.display.SetCursor(0, 0);
patch.display.WriteString("Bytebeat Synth", Font_7x10, true);
char buffer[32];
snprintf(buffer, sizeof(buffer), "Speed: %.2f", speed); // !!! Doesn't display !!!
patch.display.SetCursor(0, 12);
patch.display.WriteString(buffer, Font_7x10, true);
snprintf(buffer, sizeof(buffer), "Formula: %d", formula_index); // *** Does display ***
patch.display.SetCursor(0, 24);
patch.display.WriteString(buffer, Font_7x10, true);
speed
is declared at the top as: float speed = 0.0f;
. I’m getting the knob value with speed = patch.GetKnobValue(static_cast<DaisyPatch::Ctrl>(0)) * 4.0f + 0.1f;