| 1234567891011121314151617181920212223242526272829303132 |
- /*
- * TreePositionSwitch.h
- *
- * Created on: 21.12.2025
- * Author: FSmilari
- */
-
- #ifndef TREEPOSITIONSWITCH_H_
- #define TREEPOSITIONSWITCH_H_
-
- #include "RotaryEncoder.h"
- #include "ExEzButton.h"
-
- class TreePositionSwitch: public Loopable {
- private:
- int actualPosition;
- int Pos1_Pin;
- int Pos2_Pin;
- int Pos3_Pin;
-
- unsigned long lastDebounceTime = 0;
- unsigned long debounceTime = 50; // Standard 50 ms
- int lastReadPosition = -1;
-
- public:
- TreePositionSwitch(int Pos1_Pin, int Pos2_Pin, int Pos3_Pin);
- int getPosition(void);
- void setDebounceTime(unsigned long time);
- void loop(void) override;
- };
-
- #endif /* TREEPOSITIONSWITCH_H_ */
|