m3phisto23:
i am not familiar with debouncing a button yet - is this something that can help here?
The simplest way to do that is to ignore button presses that happen close together - say within 50 millisecs.
Try this
void changeEffect() {
if (millis() - lastButtonPressMillis >= 50) {
lastButtonPressMillis = millis();
buttonPushCounter++;
buttonPushCounter2 = 0;
}
}
If you use a RISING interrupt you will know that the button is HIGH
...R