Frästisch mit elektronischer Höhenverstellung mittels Schrittmotoren.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RotaryControler.h 730B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * RotaryControler.h
  3. *
  4. * Created on: 04.02.2022
  5. * Author: FSmilari
  6. */
  7. #ifndef ROTARYCONTROLER_H_
  8. #define ROTARYCONTROLER_H_
  9. #include "RotaryEncoder.h"
  10. #include "ExEzButton.h"
  11. class RotaryControler {
  12. private:
  13. RotaryEncoder Encoder;
  14. ExEzButton RotarySwitch;
  15. long position;
  16. public:
  17. RotaryControler(int RotEnc_Dta_Pin, int RotEnc_Clk_Pin, int RotEnc_Switch_Pin);
  18. void tick(void);
  19. void resetPosition(void);
  20. bool isSwitchPressed(void);
  21. bool isSwitchLongPressed(void);
  22. long getPosition(void);
  23. int getDirection(void);
  24. RotaryEncoder::Direction getEncoderMove();
  25. void setDebounceTime(unsigned long time);
  26. void loop(void);
  27. };
  28. #endif /* ROTARYCONTROLER_H_ */