Fix sound randomly on or off at startup

This commit is contained in:
Gabriel Augendre 2022-03-06 20:03:18 +01:00
parent 551a437881
commit 6dee9bf6b6

View file

@ -14,6 +14,7 @@ const uint16_t TONES[] = {TONE_GREEN, TONE_YELLOW, TONE_BLUE, TONE_RED};
bool soundEnabled = true;
void configure() {
pinMode(BUTTON_GREEN, INPUT_PULLUP);
if (buttonIsPressed(GREEN_INDEX)) {
soundEnabled = false;
}