-
Notifications
You must be signed in to change notification settings - Fork 158
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
The full step is detected differently than described #3
Comments
@iamanonymus What kind of encoder were you using? |
Sorry for late response :) |
@iamanonymus Interesting. I use the same encoder, and I don't have the problem you described. Maybe there are different versions of this encoder being sold under the same name. |
It could just be that you have the two output pins swapped? |
This is the sequence defined in Your code state table for full step CCW direction (just go through on paper an check): This is stated in the documentation (Rotary.cpp/README.md)
For me the problem was that steps were registered mid-turn. Either way I think You should fix at least documentation, because it does not match code.. |
First of all - using a state machine for this task is an elegant solution I must say.
I tested the code and it looks like it detects full step when both pins are high contrary to written that the step is detected when both pins go low:
Maybe I`m doing something wrong or I have different kind of rotary encoder but for me the sequence is like this:
Here is the state table that works for me:
Maybe this helps someone else...
The text was updated successfully, but these errors were encountered: