45 void setup(
unsigned int interval);
53 void setup(
const Settings& settings);
64 debouncing = intervalPositiveEdge;
66 else if(input < state) {
67 debouncing = intervalNegativeEdge;
76 bool get() {
return state; }
86 if(oldState != newState)
91 unsigned int debouncing;
92 unsigned int intervalPositiveEdge;
93 unsigned int intervalNegativeEdge;
static Edge detectEdge(bool oldState, bool newState)
Definition: Debounce.h:84
unsigned int intervalPositiveEdge
Debouncing interval when encountering a positive edge (false to true transition)
Definition: Debounce.h:21
The state has remained the same.
Definition: Debounce.h:26
The state has transitioned from high to low.
Definition: Debounce.h:25
The state has transitioned from low to high.
Definition: Debounce.h:27
unsigned int intervalNegativeEdge
Debouncing interval when encountering a negative edge ('true' to 'false' transition) ...
Definition: Debounce.h:22
Debounce a boolean reading.
Definition: Debounce.h:10
Definition: Debounce.h:19
void setup(unsigned int interval)
Definition: Debounce.cpp:15
bool process(bool input)
Definition: Debounce.h:57
Edge edgeDetected()
Definition: Debounce.h:80
Edge
Definition: Debounce.h:24