Closed antwal closed 2 years ago
Hi antwal, I think this is how your problem should be solved. Instead of extending a single-purpose library with more functionality you should combine it with another library for the button press if you need. This keeps the library small in case you don't have a button.
In my appliances I have often multiple buttons but only one rotary encoder. I suggest you use the OneButton library for all button events and the RotaryEncoder library for the turning events. See also the often wanted features that come with a button input like double-clicks and long press...
it is possible to improve the code, but I did a quick integration