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

buttons.py doesn't work: RuntimeError: Failed to add edge detection #191

Open
ctrlcctrlv opened this issue May 27, 2024 · 1 comment
Open

Comments

@ctrlcctrlv
Copy link

I wrote a C version here: https://gist.github.com/ctrlcctrlv/5d75f1d8e7bb1dd32183074d06e3bbac

But you probably want to fix this, I'm not sure how to:

fred@kinomi:~/Workspace/inky/examples/7color $ ./buttons.py
buttons.py - Detect which button has been pressed

This example should demonstrate how to:
 1. set up RPi.GPIO to read buttons,
 2. determine which button has been pressed

Press Ctrl+C to exit!


Attaching falling edge watcher to pin 5 with bouncetime 250
Traceback (most recent call last):
  File "/home/fred/Workspace/inky/examples/7color/./buttons.py", line 42, in <module>
    GPIO.add_event_detect(pin, GPIO.FALLING, handle_button, bouncetime=250)
RuntimeError: Failed to add edge detection
@2br-2b
Copy link

2br-2b commented Sep 8, 2024

I had the same problem on my Rpi 3 model B. I attempted to follow the steps here, but doing this and rebooting didn't make a difference, nor did running this as sudo, as suggested here.

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