Thank you for your donation!

Problem: GPIO button false trigger on startup

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.


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.

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: