16 lines
316 B
C++
16 lines
316 B
C++
#pragma once
|
|
|
|
class Reader
|
|
{
|
|
private:
|
|
unsigned long lastDebounceTime = 0;
|
|
bool lastButtonStateNO = LOW;
|
|
bool buttonStateNO = HIGH;
|
|
bool lastButtonStateNC = HIGH;
|
|
bool buttonStateNC = LOW;
|
|
int lastPin;
|
|
|
|
public:
|
|
bool debounceReadNO(int buttonPin);
|
|
bool debounceReadNC(int buttonPin);
|
|
}; |