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

Python • My RPI-power-button-detect python script doesn't work on Bookworm

$
0
0
I've been using this script on 3 of my 4 rpis for several years now. Just installed RPi OS Bookworm on one of my rpis and it's failing with the exception:

Code:

Failed to add edge detection
Relevant code:

Code:

# Button Press Event    GPIO.add_event_detect(        PIN_BUTTON, GPIO.FALLING, callback=button_interupt, bouncetime=100    )
Link to full python script.

The RPi.GPIO package has not changed in years, so I can't tell what's happening here. The package is installed system wide and I can turn LEDs on/off.

How to resolve this issue? Thanks!

Statistics: Posted by bassamanator — Tue Jul 02, 2024 9:05 pm



Viewing all articles
Browse latest Browse all 1241

Trending Articles