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 
21 {
22  private:
23  GPIO_pin_t Pin;
24  unsigned long debounceDelay; // the debounce time; increase if the output flickers
25  byte lastButtonState;
26  unsigned long lastDebounceTime;
27 
28 public:
31 
36  void begin(unsigned long inId, int inPin);
39  void beforeFirstLoop();
41  unsigned long loop();
42 
43 #ifdef COMMANDERS_PRINT_COMMANDERS
44 
47  void printCommander();
48 #endif
49 };
50 
51 //-------------------------------------------------------------------
52 #endif
53 #endif
54 #endif
void begin(unsigned long inId, int inPin)