Example toggle control from multiple buttons. More...
#include <AbleButtons.h>Go to the source code of this file.
Macros | |
| #define | BUTTON_A_PIN 2 |
| Connect button between this pin and ground. More... | |
| #define | BUTTON_B_PIN 3 |
| Connect button between this pin and ground. More... | |
Typedefs | |
| using | Button = AblePullupClickerButton |
| Using clicker pull-up button. More... | |
| using | ButtonList = AblePullupClickerButtonList |
| Using clicker pull-up button list. More... | |
Functions | |
| void | setup () |
| Setup the DebouncableAny example. More... | |
| void | loop () |
| Control the DebouncableAny example. More... | |
Variables | |
| Button | btnA (BUTTON_A_PIN) |
| Primary button. | |
| Button | btnB (BUTTON_B_PIN) |
| Secondary button. | |
| bool | led = false |
| On/off state of the LED. More... | |
| Button * | btns [] |
| Array of buttons for ButtonList. More... | |
| ButtonList | btnList (btns) |
| List of button to control together. | |
Example toggle control from multiple buttons.
If any button in the list is clicked, the built-in LED will toggle on/off.
Definition in file DebouncableAny.ino.
| #define BUTTON_A_PIN 2 |
Connect button between this pin and ground.
Definition at line 13 of file DebouncableAny.ino.
| #define BUTTON_B_PIN 3 |
Connect button between this pin and ground.
Definition at line 14 of file DebouncableAny.ino.
| using Button = AblePullupClickerButton |
Using clicker pull-up button.
Definition at line 10 of file DebouncableAny.ino.
Using clicker pull-up button list.
Definition at line 11 of file DebouncableAny.ino.
| void loop | ( | ) |
Control the DebouncableAny example.
Called repeatedly in a loop.
Definition at line 38 of file DebouncableAny.ino.
| void setup | ( | ) |
Setup the DebouncableAny example.
Called once to initialise everything.
Definition at line 30 of file DebouncableAny.ino.
| Button* btns[] |
| bool led = false |
On/off state of the LED.
Definition at line 18 of file DebouncableAny.ino.