diff --git a/Moozy_firmware.ino b/Moozy_firmware.ino index 05784b3..2028231 100644 --- a/Moozy_firmware.ino +++ b/Moozy_firmware.ino @@ -91,12 +91,12 @@ void setup() { // Main loop // ------------- void loop() { - if (!digitalRead(PinInput0)) { todo = fctinput0; } - if (!digitalRead(PinInput1)) { todo = fctinput1; } - if (!digitalRead(PinInput2)) { todo = fctinput2; } - if (!digitalRead(PinInput3)) { todo = fctinput3; } + if ((!digitalRead(PinInput0)) & (fctinput0 !="")) { todo = fctinput0; } + if ((!digitalRead(PinInput1)) & (fctinput1 !="")) { todo = fctinput1; } + if ((!digitalRead(PinInput2)) & (fctinput2 !="")) { todo = fctinput2; } + if ((!digitalRead(PinInput3)) & (fctinput3 !="")) { todo = fctinput3; } - if ((todo != "") & (millis() > debouncetime + 100)) { + if ((todo != "") & (millis() > debouncetime + 75)) { digitalWrite(LedMoozy, true); // for debug if ((todo =="LC") & (!doNotRepeat)) {doNotRepeat = true; dolc(); } if ((todo =="LCD") & (!doNotRepeat)) {doNotRepeat = true; dolcd(); }