MCPcopy Create free account

hub / github.com/JChristensen/JC_Button / functions

Functions14 in github.com/JChristensen/JC_Button

MethodButton
Button(pin, dbTime, puEnable, invert) instantiates a button object. Required parameter: pin The Arduino pin the button is connected to Optional
src/JC_Button.h:23
MethodToggleButton
constructor is similar to Button, but includes the initial state for the toggle.
src/JC_Button.h:84
Methodbegin
initialize a Button object
src/JC_Button.cpp:9
Methodchanged
has the state changed?
src/JC_Button.h:103
MethodisPressed
Returns true if the button state was pressed at the last call to read(). Does not cause the button to be read.
src/JC_Button.h:36
MethodisReleased
Returns true if the button state was released at the last call to read(). Does not cause the button to be read.
src/JC_Button.h:40
MethodlastChange
Returns the time in milliseconds (from millis) that the button last changed state.
src/JC_Button.h:60
MethodpressedFor
Returns true if the button state at the last call to read() was pressed, and has been in that state for at least the given number of milliseconds. Thi
src/JC_Button.h:51
Methodread
read the button and return its state. should be called frequently.
src/JC_Button.h:89
Methodread
returns the state of the button, true if pressed, false if released. does debouncing, captures and maintains times, previous state, etc.
src/JC_Button.cpp:21
MethodreleasedFor
Returns true if the button state at the last call to read() was released, and has been in that state for at least the given number of milliseconds. Th
src/JC_Button.h:56
MethodtoggleState
return the current state
src/JC_Button.h:106
MethodwasPressed
These functions check the button state to see if it changed between the last two reads and return true or false accordingly. These functions do not ca
src/JC_Button.h:45
MethodwasReleased
src/JC_Button.h:46