Digigurdy-baz
|
#include <togglebutton.h>
Public Member Functions | |
ToggleButton (int my_pin, int interval) | |
Constructor. This extends GurdyButton with a toggle on/off feature. More... | |
void | update () |
Samples the button and determines toggle status. More... | |
bool | toggleOn () |
Returns the toggle status of the button. More... | |
void | setToggle (bool new_toggle) |
Forcibly sets the toggle status of the button. More... | |
![]() | |
GurdyButton (int my_pin, int interval) | |
Constructor. This class handles simple push-on, release-off buttons. More... | |
void | update () |
Polls the button and updates its state. More... | |
bool | beingPressed () |
Reports if the button is being pressed this update() cycle. More... | |
bool | wasPressed () |
Reports if the button was pressed down this update() cycle. More... | |
bool | wasReleased () |
Reports if the button was released this update() cycle. More... | |
Additional Inherited Members | |
![]() | |
Bounce * | bounce_obj |
bool | being_pressed |
ToggleButton::ToggleButton | ( | int | my_pin, |
int | interval | ||
) |
Constructor. This extends GurdyButton with a toggle on/off feature.
my_pin | The digitial voltage pin to be used. |
interval | The debounce interval to be used. |
void ToggleButton::setToggle | ( | bool | new_toggle | ) |
Forcibly sets the toggle status of the button.
new_toggle | True = toggled on, false = toggled off |
bool ToggleButton::toggleOn | ( | ) |
Returns the toggle status of the button.
void ToggleButton::update | ( | ) |
Samples the button and determines toggle status.