Example on/off 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 = AblePullupButton |
Using basic pull-up button. More... | |
using | ButtonList = AblePullupButtonList |
Using basic pull-up button list. More... | |
Functions | |
void | setup () |
Setup the ButtonableAll example. More... | |
void | loop () |
Control the ButtonableAll example. More... | |
Variables | |
Button | btnA (BUTTON_A_PIN) |
Primary button. | |
Button | btnB (BUTTON_B_PIN) |
Secondary button. | |
Button * | btns [] |
Array of buttons for ButtonList. More... | |
ButtonList | btnList (btns) |
List of button to control together. | |
Example on/off control from multiple buttons.
Only when all the button in the list are pressed will the built-in LED lights. Each button is connected to a subsequent pin.
Definition in file ButtonableAll.ino.
#define BUTTON_A_PIN 2 |
Connect button between this pin and ground.
Definition at line 14 of file ButtonableAll.ino.
#define BUTTON_B_PIN 3 |
Connect button between this pin and ground.
Definition at line 15 of file ButtonableAll.ino.
using Button = AblePullupButton |
Using basic pull-up button.
Definition at line 11 of file ButtonableAll.ino.
using ButtonList = AblePullupButtonList |
Using basic pull-up button list.
Definition at line 12 of file ButtonableAll.ino.
void loop | ( | ) |
Control the ButtonableAll example.
Called repeatedly in a loop.
Definition at line 38 of file ButtonableAll.ino.
void setup | ( | ) |
Setup the ButtonableAll example.
Called once to initialise everything.
Definition at line 30 of file ButtonableAll.ino.