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

Quick Press of Button messes up PIO on DebouncerLowPIO #1

Closed
brandoningli opened this issue Feb 12, 2021 · 4 comments
Closed

Quick Press of Button messes up PIO on DebouncerLowPIO #1

brandoningli opened this issue Feb 12, 2021 · 4 comments

Comments

@brandoningli
Copy link

Expected Behavior

Quickly pressing a button won't register a press, but will allow for a subsequent press.

Actual Behavior

Quickly pressing and releasing a button messes up the state machine somehow and prevents all subsequent presses until the board is reset.

Steps to Reproduce

  1. Start the button object
  2. Press and release the physical button very rapidly

Additional Information

The same behavior isn't observed when using DebouncerHighPIO

@benevpi
Copy link
Owner

benevpi commented Feb 12, 2021 via email

@brandoningli
Copy link
Author

Yes, I'm running the latest version of both your script and the micropython firmware.

@benevpi
Copy link
Owner

benevpi commented Feb 12, 2021

Hmm.

I think we're hitting a bug on MicroPython PIO. I think it does something odd sometimes when you have a label at the end of a program - I hit this before with debouncerHigh, but didn't seem to get it on Low. I've added an extra instruction that does nothing at the end. I think that will solve it, but I've had trouble reproducing it here, so let me know how you get on.

@brandoningli
Copy link
Author

That patch seems to have fixed the issue.

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