Replies: 2 comments
-
The encoder is tested on ESP32 along with S2 and S3, and should work fine on all. I have several test boards with encoders attached. I would start with the absolute basics here, is the wiring all good? Is the encoder working properly? If you have a scope I would attach it to A and B (clock, data) of the encoder. I would then see if the standard grey code can be seen on the scope. If you do not maybe write a small sketch that lights up an LED as the clock and data pin change to ensure that much is working. Also, make sure the encoder is attached to inputs that are pull-up capable (IE one that can also be a GPIO output), if it is not connected to an output-capable pin you can do the pull-up yourself instead with 10K resistors. |
Beta Was this translation helpful? Give feedback.
-
Well - keep is simple stupid they say!! Seems I had a dud encoder. Changing it out worked first go. Thank you for taking the time, very much appreciated. TcMenu is really nice, I appreciate that too. Especially nice actually on a little oled and accessed via encoder instead of buttons. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm having issues getting the menu to work with rotary encoder type KY-040. My switch/press works so I gather the call to menuMgr.initForEncoder() is doing something, but nothing I do turning the knob seems to have an input. I've tried every combination of pin numbers that I can think of.
Board: ESP32 Lolin32 Lite
Encoder: Generic KY-040
I note that the API calls for PinA and PinB, though my encoder labels these are Clock and Data. I've tried the I2C pins and random ones, nothing seems to enable input control when turning the knob. Pressing the knob does work though.
Question - Am I using the wrong type of encoder, if so what is the one to use?
UPDATE: I found a similar discussion thread, so tried the IoAbstraction rotary encoder example. I coudn't get that to work either.
thanks, Damien
Beta Was this translation helpful? Give feedback.
All reactions