buttonPressed()
buttonPressed()
Returns bool
This function returns a boolean that is true during the loop that the button is pressed, and false otherwise. It will only read as true until updateButton() is called again. This makes it useful for triggering an action.
Example:
buttonPressed() is debounced, see debounceTime() to change the debounce time.