Button

 

Button
Set the initial state of the button.

clickHandler()
Register a handler for clicks on the button.

held()
Check to see if the button has been pressed for a time milliseconds.

heldFor()
Polling model for holding, this is true every check after hold time.

holdHandler()
Register a handler for when the button is held.

holdTime()
Get the time this button has been held.

isPressed()
Return the bitRead(state,CURRENT) of the switch.

presses()
Counts how many time the button has been pressed.

pressHandler()
Register a handler for presses on the button.

pulldown()
Set pin LOW as default.

pullup()
Prepare logic for a pullup button.

releaseHandler()
Register a handler for releases on this button.

setHoldThreshold()
Set the hold event time threshold.

stateChanged()
Return true if state has been changed.

uniquePress()
Return true if the button is pressed, and was not pressed before.

wasPressed()
Return true if the button has been pressed.