Replace tone() with custom timer
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
volatile unsigned long lastButtonPress = millis();
|
||||
|
||||
// Debouncing na timerze:
|
||||
// https://github.com/khoih-prog/TimerInterrupt/blob/master/examples/SwitchDebounce/SwitchDebounce.ino
|
||||
void initButton() {
|
||||
pinMode(BUTTON_PIN, INPUT_PULLUP);
|
||||
// Order of ISRs matter: RISING should be invoked first
|
||||
|
||||
Reference in New Issue
Block a user