| 1234567891011121314151617181920212223242526272829303132333435 |
- /*
- * RotaryControler.h
- *
- * Created on: 04.02.2022
- * Author: FSmilari
- */
-
- #ifndef ROTARYCONTROLER_H_
- #define ROTARYCONTROLER_H_
-
- #include "RotaryEncoder.h"
- #include "ExEzButton.h"
-
- class RotaryControler {
- private:
- RotaryEncoder Encoder;
- ExEzButton RotarySwitch;
- long position;
-
- public:
- RotaryControler(int RotEnc_Dta_Pin, int RotEnc_Clk_Pin, int RotEnc_Switch_Pin);
- void tick(void);
- void resetPosition(void);
- bool isSwitchPressed(void);
- bool isSwitchLongPressed(void);
- long getPosition(void);
- int getDirection(void);
- RotaryEncoder::Direction getEncoderMove();
- void setDebounceTime(unsigned long time);
- void loop(void);
- };
-
-
-
- #endif /* ROTARYCONTROLER_H_ */
|