Complete rewrite of Application

This commit is contained in:
2026-05-04 22:30:50 +02:00
parent 507a874304
commit 195d753d81
9 changed files with 360 additions and 180 deletions

31
Button.h Normal file
View File

@@ -0,0 +1,31 @@
#ifndef BUTTON_H
#define BUTTON_H
#include <Arduino.h>
class Button {
private:
uint8_t pin;
bool stableState;
bool lastReading;
bool prevStableState;
unsigned long lastDebounceTime;
const unsigned long debounceDelay = 50;
unsigned long pressStart;
public:
Button(uint8_t pin);
void begin();
void update(unsigned long now);
bool pressed();
bool released();
bool isDown();
bool held(unsigned long ms);
};
#endif