Test the Arduino Button Library Extension (ABLE). More...
Go to the source code of this file.
Functions | |
void | setup () |
Setup the PushBtn example. More... | |
void | loop () |
Control TestAbleButton. More... | |
Variables | |
Button | btnA (BUTTON_A_PIN, onEvent) |
Button A. | |
Button | btnB (BUTTON_B_PIN, onEvent) |
Button B. | |
Button * | btns [NUM_BUTTONS] |
Array of buttons for ButtonList. More... | |
ButtonList | btnList (btns) |
List of buttons. | |
bool | led = false |
State of the builtin LED. More... | |
Test the Arduino Button Library Extension (ABLE).
This program will periodically output "Looking OK..." to the Serial port. As you press buttons connected to pins 2 and 3 it will assert the button settings in the callback fuctions and in the main loop.
The TestAbleButton program is split (by design) into multiple files to ensure AbleButtons works in multi-module programs. A common Config.h header file declares common elements shared across these modules.
Definition in file TestAbleButton.ino.
void loop | ( | ) |
Control TestAbleButton.
Called repeatedly in a loop.
< Timer to preiodically print OK message.
Definition at line 74 of file TestAbleButton.ino.
void setup | ( | ) |
Setup the PushBtn example.
Called once to initialise everything.
Definition at line 37 of file TestAbleButton.ino.
Button* btns[NUM_BUTTONS] |
bool led = false |
State of the builtin LED.
Definition at line 32 of file TestAbleButton.ino.