Closed mkrzewic closed 3 years ago
I will check... What encode do you use (init parameters)
just the simplest default: RotaryEncoder encoder(encoderPin1, encoderPin2); (but i did try the non-default latching modes in 1.5.0, all have the same problem.)
i'm using interrupts to read, and get the direction like this:
auto dir = static_cast
Hello, same problem in my project... What is different from 1.3.0 to 1.5.0? Should I use 1.3.0?
I cannot easily reproduce. Please check that the inputs are both HIGH in the case of staying in a latch position. See src\RotaryEncoder.cpp # 33.
If this is not the case then use another mode like LatchMode::FOUR0
In case this is not successful, please let me know how the input changes when slowly turning the knob.
// positions: [3] 1 0 2 [3] 1 0 2 [3] // [3] is the positions where this rotary switch stops. It has 4 states until it stops again. // mode = FOUR3 // ==> right, count up // <== left, count down
Hello. I tried to do something like this:
if (enc.isLeft()) i--; if (enc.isRight()) i++;
and get this:
maybe I'm not using the function correctly?
I encountered the same issue with LatchMode::Four0 (the default). After examining the state sequence I determined my encoder latched on 3, not 0. Changing to LatchMode::Four3 made the problem disappear.
Thanks for the hint.
in version 1.5.0 when reversing the direction of the knob the first getDirection returns 0 (norotation), needs one more tick to start reporting the proper direction. With 1.3.0 it works correctly.