remove this
and add
buttonPressed = 0;
where you act on the button, like this
if(buttonPressed == 1){
Serial.println("Button Pressed");
buttonPressed = 0;
}
If you like that, maybe buttonPressed could have a better name.
a7
remove this
and add
buttonPressed = 0;
where you act on the button, like this
if(buttonPressed == 1){
Serial.println("Button Pressed");
buttonPressed = 0;
}
If you like that, maybe buttonPressed could have a better name.
a7