Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4105

Python • Does RPi.GPIO work in Bookworm??

$
0
0
I have a pi 4 and upgraded the OS to Bookworm 64 bit yesterday. I then ran the python program (which worked fine before I upgraded) which uses the RPi.GPIO event detect library amongst other things. Its relatively simple stuff along the lines of:

Code:

GPIO.add_event_detect(switchx, GPIO.BOTH, callback=triggerx, bouncetime=250)GPIO.add_event_detect(switchy, GPIO.BOTH, callback=triggery, bouncetime=250)
However, I get the error message "RuntimeError: Failed to add edge detection" and it cannot proceed.

Ive since read that RPi.GPIO is no longer available in Bookworm but can find anything official. If that is the case then thats a real shame and also means I need to re-write a lot of my old python programs if I want to run Bookworm.

If it is no longer available, is there a simple drop-in replacement?

Statistics: Posted by component — Wed Jun 19, 2024 8:18 am



Viewing all articles
Browse latest Browse all 4105

Trending Articles