Fix a cursor position bug in BeepDemo example

This commit is contained in:
Scott Allen 2020-08-10 17:01:06 -04:00
parent 7fcbd35266
commit 350a6ee629
1 changed files with 3 additions and 1 deletions

View File

@ -52,6 +52,8 @@ void loop() {
arduboy.pollButtons(); arduboy.pollButtons();
arduboy.clear();
if (arduboy.justPressed(LEFT_BUTTON)) { if (arduboy.justPressed(LEFT_BUTTON)) {
// Play a 523.251Hz tone (piano note C5) for 5 frames (200ms at 25 FPS) // Play a 523.251Hz tone (piano note C5) for 5 frames (200ms at 25 FPS)
// beep.freq(523.251) is used to convert 523.251Hz to the required count // beep.freq(523.251) is used to convert 523.251Hz to the required count
@ -127,7 +129,7 @@ void loop() {
objectX = 0; objectX = 0;
} }
arduboy.display(CLEAR_BUFFER); arduboy.display();
} }
void commandText(const char* text) { void commandText(const char* text) {