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

how use "wait_for_edge" function that eliminate key jitter? #74

Closed
jcyhcs opened this issue Jul 27, 2022 · 2 comments
Closed

how use "wait_for_edge" function that eliminate key jitter? #74

jcyhcs opened this issue Jul 27, 2022 · 2 comments

Comments

@jcyhcs
Copy link

jcyhcs commented Jul 27, 2022

hi,professor:
i use wait_for_edge function, detect button pushed when GPIO::EDGE::FALLING, but sometimes it got one, and sometime it got multi events, so , what can i do? eliminate the mistake trgger?
thanks , please help me!

@pjueon
Copy link
Owner

pjueon commented Jul 27, 2022

Hi. have you tried to set debounce time for the wait_for_edge function?

for example:

// debounce_time set to 10ms
// no timeout
GPIO::wait_for_edge(channel, GPIO::RISING, 10);

If you already set the debounce time, what happens if you increase it? Does it fix your issue?

And could you give us the information of your HW setup? I'm not familiar with HW stuff at all, but somebody else may give you some advice that can fix your issue from the HW aspect.

@pjueon
Copy link
Owner

pjueon commented Sep 29, 2022

No response for a long time, closing it for now.

@pjueon pjueon closed this as completed Sep 29, 2022
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

2 participants