-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double input #4
Comments
I'm currently working on a rewrite of the library using Linux device tree. It's got an instant response and doesn't miss anything anymore. Downsides are that there will be a breaking change in the API, and that the encoders must be setup on the Pi before being available in Python scripts (i.e. they would have state). Take a look at the |
@SebDominguez I just tested the code, and it seems it's your pins choice that is causing trouble. Try with |
Ok I'll try this ASAP. I choose those pins because I saw you also used them on your other project. I assumed they was safe to use then. |
You're right it did work on the radio, but somehow I also got erratic behavior with these pins on a RPi 3B with Raspbian Buster. Maybe something has changed (kernel, GPIO handling...) since I wrote the tutorial. |
Yes I also experimented erratic behavior on buster (ghost triggering on GPIO using add_event_detect from RPi.GPIO) I didn't tested on stretch to see if this was caused by the update |
If you still experience the issue after changing pins, I updated the library on the evdev branch with the new |
Does the output make sense, apart from the fact that the callbacks get executed twice? In other words, do the right callbacks get executed (twice) each time you interact with the encoder? |
Yes the up callback is executed twice for each clockwise steps and the down callback is executed twice on each counterclockwise steps. At no points a clockwise rotation called the down callback. same for the counterclockwise rotation |
I'm opening a new issue to hopefully get more visibility there...
Having a similar same issue:
inc_callback
,dec_callback
&chg_callback
get called multiple time for each "steps" of my rotary encoder.sw_callback
is called once as expected. I tried to change the polling_interval, but this seems to make things worst as if I keep turning the encoder clockwise I'll get the counterclockwise callback executed.Adding
logger.info(self.polling_interval)
onpyky040.py
at line 47 and 133 give me the following output:INFO:root:5
Maybe this is due to the cheap construction of the rotary encoder module? I'm using those one (I thing you are using the same one)
With the threaded example the callback get called only twice
this is the code I run
Well I just received another rotary encoder (PEC16-4220F-S0024) and I still have this issue
Originally posted by @SebDominguez in #1 (comment)
The text was updated successfully, but these errors were encountered: