| 123456789101112131415161718192021222324252627282930 |
- /*
- * ExEzButton, supports long press detection. Inherits from ezButton.
- *
- * Erstellt: 05.01.2021
- * Autor: Flo Smilari
- */
-
- #include <ezButton.h>
- #include "Loopable.h"
-
- class ExEzButton: public ezButton, public Loopable {
- private:
- bool inverted;
- unsigned long longpressTime;
- unsigned long pressedTime;
- unsigned long releasedTime;
-
- public:
- ExEzButton(int pin);
- ExEzButton(int pin, bool _inverted);
- ExEzButton(int pin, bool _inverted, int _longpressTime);
- bool isPressing(void);
- bool isPressed();
- bool isLongPressed(void);
- void loop(void) override;
- };
-
- //Added by Sloeber
- #pragma once
-
|