Displayotron 3000 Joystick.py "Failed to add edge detection"

Hi. I have just setup my new DOT3000 and although most of the sample scripts work OK the joystick script fails with a “Failed to add edge detection” message. This a pain as I also cannot get the radio script working for the same reason. I have double checked and reinstalled all the necessary “stuff” but to no avail. Can anyone help out?

Thanks, Ray

Try this:

pip install rpi-gpio -I --upgrade --force-reinstall

The edge detection happens within RPi.GPIO, so perhaps you have an old version or something else is awry. This is a good first step.

Thanks for your reply. I tried your suggestion but nothing changed. I put a fresh install of Raspbian on my SD card and after updating I then fired up a script to install and configure everything automatically. This comes from the Pimoroni.com website

curl -sS get.pimoroni.com/dot3k | bash

It still failed but after adjusting line 184 from 10 to 20 in the radio.py plugin, this resulted in sweet music coming from the headphones. It was suggested to me that maybe VLC was slow in responding to Pythons requests so try increasing the connection attempts.


Are you still seeing this error?

GPIO.add_event_detect(button, GPIO.FALLING, callback=handler, bouncetime=bounce)
RuntimeError: Failed to add edge detection

No. It looks as though my restarting from scratch solved the problem. Looks like I did something wrong to start off with. Thanks for your help.


I think it’s just a dodgy version of the RPi.GPIO library, or something to that effect. I found a bug report filed with this same error for a specific version. Glad you got it up and running though!

Hi … i get the same issue but can’t rebuild my Pi.
I have reinstalled the gpio and it is still the same …

anything else i could try?


How have you reinstalled RPi.GPIO? it can be rather tricky… from the top of my head you should do something like this:

sudo pip uninstall RPi.GPIO
sudo apt-get update
sudo apt-get install python-rpi.gpio

For Python 3 this will depend on what Raspbian distribution you have. First try:

sudo pip-3.2 uninstall RPi.GPIO
sudo apt-get update
sudo apt-get install python3-rpi.gpio

but if that fails:

sudo pip3 uninstall RPi.GPIO
sudo apt-get update
sudo apt-get install python3-rpi.gpio