I want to detect if a button has been pressed, but what I don't want is for it to keep returning the "pressed" state more than once within a second or two.
For example, with this code:
void loop() {
passButtonState = digitalRead(passButton);
if (passButtonState == LOW) {
Serial.println("PASSED!");
}
}
Would spit out something like this with a single quick press of the button:
PASSED!
PASSED!
PASSED!
PASSED!
PASSED!
PASSED!
PASSED!
PASSED!
PASSED!
But what I want is for a single button press to just return PASSED!
once for that single button press.