JetsonGPIO icon indicating copy to clipboard operation
JetsonGPIO copied to clipboard

how use "wait_for_edge" function that eliminate key jitter?

Open jcyhcs opened this issue 3 years ago • 1 comments

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!

jcyhcs avatar Jul 27 '22 06:07 jcyhcs

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 avatar Jul 27 '22 10:07 pjueon

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

pjueon avatar Sep 29 '22 16:09 pjueon