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


#1

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


#2

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.


#3

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.

Ray


#4

Are you still seeing this error?

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

#5

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.

Ray


#6

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!


#7

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?

thanks


#8

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