Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: GPIO button false trigger on startup
#19
@waffle

What I mean by appropriate change to the call-back function is that if you change from detecting a rising edge to detecting a falling edge, then the call-back function has to be changed to check that the signal is still '0' after a suitable timeout instead of still '1'.

There's some interesting information in the "Debounce and Delay" section of this reference. The author suggests there's a bug in RPi.GPIO. On the face of it, his fix is the same as what is done in moOde's GPIO handler, but I was struck by his comment about the appropriate length of the timeout.

Without a testbed here, I can't contribute anything beyond this.

Good luck.

Regards,
Kent

Note added: There are plenty of resources on line.  This is just the last article in a series of 9 called collectively "Ultimate Guide to Switch Debounce." Good illustrations and good discussion.
Reply


Messages In This Thread
GPIO button false trigger on startup - by waffle - 06-24-2020, 04:21 PM
RE: GPIO button false trigger on startup - by TheOldPresbyope - 07-05-2020, 02:37 PM

Forum Jump: