Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JChristensen/JC_Button
/ functions
Functions
14 in github.com/JChristensen/JC_Button
⨍
Functions
14
◇
Types & classes
3
Method
Button
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
Method
ToggleButton
constructor is similar to Button, but includes the initial state for the toggle.
src/JC_Button.h:84
Method
begin
initialize a Button object
src/JC_Button.cpp:9
Method
changed
has the state changed?
src/JC_Button.h:103
Method
isPressed
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
Method
isReleased
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
Method
lastChange
Returns the time in milliseconds (from millis) that the button last changed state.
src/JC_Button.h:60
Method
pressedFor
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
Method
read
read the button and return its state. should be called frequently.
src/JC_Button.h:89
Method
read
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
Method
releasedFor
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
Method
toggleState
return the current state
src/JC_Button.h:106
Method
wasPressed
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
Method
wasReleased
src/JC_Button.h:46