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

Two clicks per step #5

Open
Yury-MonZon opened this issue May 26, 2018 · 2 comments
Open

Two clicks per step #5

Yury-MonZon opened this issue May 26, 2018 · 2 comments

Comments

@Yury-MonZon
Copy link

Hi!
I wonder why do I have to make 2 audible clicks (or dents) to get 1 step? (Using the ky-040 - the most common cheap encoders.)
I've tried to #define HALF_STEP but that didn't seem to help. Any hints would be great.

Thanks.

@buxtronix
Copy link
Owner

In this case, you're best bet is to probably just only count every other output from the library. So taking the examples in the code, only do work when 'counter' is even.

Though that still leaves the question about how to behave if say the encoder turns on 'click' CW, then is rotated CCW back one click. Should this result in another CCW output, or not? This is something your software can also handle.

In theory it's also possible to write additional state machine tables, but client-side is the initial place to take a stab at it.

@alexgoldstone
Copy link

I have the same issue due to encoder waveform not matching (images attached)... I guess the best way to solve this is create a new state table... any assistance will be greatly appreciated... I'll share what I come up with if I solve this first.

Screenshot 2020-12-29 at 16 21 56

Screenshot 2020-12-29 at 16 22 31

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

No branches or pull requests

3 participants