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

Encoder counts only up – debounce cap was missing #46

Closed
Barabba11 opened this issue May 15, 2023 · 2 comments
Closed

Encoder counts only up – debounce cap was missing #46

Barabba11 opened this issue May 15, 2023 · 2 comments
Assignees

Comments

@Barabba11
Copy link

Hi, I don't know what is wrong there, if I disconnect one of the 2 inputs I have no events (right), but If I invert them or change rotation it always increase. ON one direction it only increase, in the other if I go really slow it decrease by 1, but suddenly increase by one
Which parameter should I change? Thanks

I have ESP8266 and a classic mechanical encoder, I'm using D5 and D6

@LennartHennigs
Copy link
Owner

LennartHennigs commented May 20, 2023

Hey,
that is kind of hard to tell from afar.
Encoders can have different steps per click values, try setting a different steps_per_click value:

ESPRotary(byte pin1, byte pin2, byte steps_per_click = 1, int lower_bound = INT16_MIN, int upper_bound = INT16_MAX, int inital_pos = 0, int increment = 1);

Or, it might be faulty.

@Barabba11
Copy link
Author

Mate, thank you for your kind help, the reason was the bounces of encoder, connecting condensers 0,1uF solved it. I strongly suggest you to write it on your notes, they sell modules without them so it can happen often that people getting errors
https://github.com/enjoyneering/RotaryEncoder/raw/master/images/rotary_encoder_shematic.png

@LennartHennigs LennartHennigs self-assigned this Jan 28, 2024
@LennartHennigs LennartHennigs changed the title It counts only up Encoder counts only up – debounce cap was missing Mar 26, 2024
@LennartHennigs LennartHennigs pinned this issue Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants