Made debounceRead function work

This commit is contained in:
2025-10-31 14:23:42 +01:00
parent a8ddf41be3
commit 194e608f9e
4 changed files with 48 additions and 38 deletions

View File

@@ -1,3 +1,13 @@
#pragma once
bool debounceRead(int buttonPin, int *lastButtonState, unsigned long *lastDebounceTime, int *buttonState);
class Reader
{
private:
unsigned long lastDebounceTime = 0;
bool lastButtonState = LOW;
bool buttonState = HIGH;
int lastPin;
public:
bool debounceRead(int buttonPin);
};

View File

@@ -1,6 +1,6 @@
#pragma once
const int DEBOUNCE_DELAY = 50;
const int DEBOUNCE_DELAY = 200;
const int USER_STEPS = 2;
const int STAFF_STEPS = 16;