Commanders
Arduino buttons/bus library
ButtonsCommanderSwitchOnePin.hpp
1
//-------------------------------------------------------------------
2
#ifndef __buttonsCommanderSwitchOnePin_H__
3
#define __buttonsCommanderSwitchOnePin_H__
4
//-------------------------------------------------------------------
5
6
#include <
Commanders.h
>
7
#ifndef NO_BUTTONSCOMMANDER
8
#ifndef NO_BUTTONSCOMMANDERSWITCH
9
20
class
ButtonsCommanderSwitchOnePin
:
public
ButtonsCommanderButton
21
{
22
private
:
23
GPIO_pin_t Pin;
24
unsigned
long
debounceDelay;
// the debounce time; increase if the output flickers
25
GPIO_pin_t lastSelectedPin;
26
27
int
lastButtonState;
// the previous reading from the current input pin
28
unsigned
long
lastDebounceTime;
// the last time the current output pin was toggled
29
30
public
:
32
ButtonsCommanderSwitchOnePin
();
33
38
void
begin
(
unsigned
long
inId,
int
inPin);
41
void
beforeFirstLoop
();
43
unsigned
long
loop
();
44
45
#ifdef COMMANDERS_PRINT_COMMANDERS
46
49
void
printCommander();
50
#endif
51
};
52
53
//-------------------------------------------------------------------
54
#endif
55
#endif
56
#endif
ButtonsCommanderSwitchOnePin::loop
unsigned long loop()
Definition:
ButtonsCommanderSwitchOnePin.cpp:38
ButtonsCommanderSwitchOnePin::begin
void begin(unsigned long inId, int inPin)
Definition:
ButtonsCommanderSwitchOnePin.cpp:17
ButtonsCommanderSwitchOnePin::ButtonsCommanderSwitchOnePin
ButtonsCommanderSwitchOnePin()
Definition:
ButtonsCommanderSwitchOnePin.cpp:11
ButtonsCommanderButton
Definition:
ButtonsCommanderButton.hpp:15
ButtonsCommanderSwitchOnePin
Definition:
ButtonsCommanderSwitchOnePin.hpp:20
ButtonsCommanderSwitchOnePin::beforeFirstLoop
void beforeFirstLoop()
Definition:
ButtonsCommanderSwitchOnePin.cpp:25
Commanders.h
src
ButtonsCommanderSwitchOnePin.hpp
Generated on jeu. août 10 2017 14:30:09 for Commanders by
1.2.10