Last active
January 31, 2024 05:32
-
-
Save jedie/8564e62b0b8349ff9051d7c5a1312ed7 to your computer and use it in GitHub Desktop.
microPython button irq debouncing
Hi,
What if self.callback function runs longer than the min_ago value, e.g. 300 ms?
Should one increase min_ago accordingly?
In my understanding, it's better to swap lines #35 and #36.
Unfortunately, the debouncing according to the script above did not work in my application.
So I'm using the "Switch debouncing" instead, as described here.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi.
IMHO it's more a button "long press" detection than a debounce...
Am I right?
(Also, using
IRQ_RISING
only, triggers changes to0
exclusively)This is my fork: https://gist.github.com/dentex/8035c7d62279ae139e915e7f4f3dbe91