Skip to content
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

Skips a step on direction change #19

Closed
ilium007 opened this issue May 8, 2020 · 7 comments
Closed

Skips a step on direction change #19

ilium007 opened this issue May 8, 2020 · 7 comments
Labels

Comments

@ilium007
Copy link

ilium007 commented May 8, 2020

The library works fine in either direction with a Bourns PEC-12R rotary encoder except when changing direction. When changing direction it takes another click on the encoder to register an increase or decrease.

@ilium007
Copy link
Author

ilium007 commented May 8, 2020

Just worked out, it only does it when signals are running via the R/C circuit and then inverting Schmitt-trigger that I use in my designs - 74HC14N. Works fine when the 74HC14N is removed from circuit.

@rkonklex
Copy link

Interesting! I also had the library skip steps when changing direction. I'm using it with a 100PPR manual pulse generator. It has 6 terminals including both positive and inverted A & B outputs. The library skipped a step when connected to positive A & B outputs, but the problem disappeared when inverted outputs were used. Still, IMO it's a bug, the library should handle both cases equally.

@mathertel
Copy link
Owner

This may be caused by the fact that the version < 1.5.0 only reported a new value on state 3 (not on state 0)
What is the state value, when the encoder is in a latch position ?

Please check with the new parameter on initialization.

@ilium007
Copy link
Author

ilium007 commented Feb 8, 2021

Sorry, why was the issue closed? Had it been fixed?

@mathertel
Copy link
Owner

I did a lot of testing during implementing the new version and never saw this behavior. Please re-test with new version and maybe you can add more information for the root cause. Feel free to send me a pull request.

@ilium007
Copy link
Author

New version works perfectly for me now. Thanks!

@ilium007
Copy link
Author

This may be caused by the fact that the version < 1.5.0 only reported a new value on state 3 (not on state 0)
What is the state value, when the encoder is in a latch position ?

Please check with the new parameter on initialization.

This was the reason it failed for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants