Hi,
I just upgraded my Raspberry Pi Zero W (v1.1) from Buster to Bookworm (well, not really an upgrade, but just installed bookworm from scratch and copied my scripts to it) and the python script that I had controlling one GPIO pin no longer works. The script runs, without error, but it no longer toggles the GPIO pin.
I have been doing some research on this and read about how RPI 5 requires GPIO python programs, which were using RPI.GPIO, to be re-written/adapted. Not sure if that's an RPI 5 "thing" or if it applies to all Pi's on bookworm.
I also found a thread talking about a "drop-in replacement" for the RPI.GPIO library and applied that but it made no difference.
What am I missing?
Here is my system information:
I just upgraded my Raspberry Pi Zero W (v1.1) from Buster to Bookworm (well, not really an upgrade, but just installed bookworm from scratch and copied my scripts to it) and the python script that I had controlling one GPIO pin no longer works. The script runs, without error, but it no longer toggles the GPIO pin.
I have been doing some research on this and read about how RPI 5 requires GPIO python programs, which were using RPI.GPIO, to be re-written/adapted. Not sure if that's an RPI 5 "thing" or if it applies to all Pi's on bookworm.
I also found a thread talking about a "drop-in replacement" for the RPI.GPIO library and applied that but it made no difference.
What am I missing?
Code:
pi@gpi:~ $ cat toggle.py import RPi.GPIO as GPIOimport timegpioPin=24GPIO.setmode(GPIO.BCM)GPIO.setup(gpioPin,GPIO.OUT)GPIO.output(gpioPin,GPIO.HIGH)time.sleep(1)GPIO.output(gpioPin,GPIO.LOW)GPIO.cleanup()pi@gpi:~ $ python toggle.py && echo $?0
Code:
pi@gpi:~ $ whoamipipi@gpi:~ $ groupspi adm dialout cdrom sudo audio video plugdev games users input render netdev gpio i2c spipi@gpi:~ $ dpkg-query -f '${binary:Package}\n' -W | grep python3-rpipython3-rpi-lgpiopi@gpi:~ $ cat /proc/device-tree/model && echoRaspberry Pi Zero W Rev 1.1pi@gpi:~ $ ls -l /dev/ | grep gpiocrw-rw---- 1 root gpio 254, 0 May 15 15:51 gpiochip0crw-rw---- 1 root gpio 241, 0 May 15 15:52 gpiomempi@gpi:~ $ uname -aLinux gate-pi 6.6.28+rpt-rpi-v6 #1 Raspbian 1:6.6.28-1+rpt1 (2024-04-22) armv6l GNU/Linuxpi@gpi:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"NAME="Raspbian GNU/Linux"VERSION_ID="12"VERSION="12 (bookworm)"VERSION_CODENAME=bookwormID=raspbianID_LIKE=debianHOME_URL="http://www.raspbian.org/"SUPPORT_URL="http://www.raspbian.org/RaspbianForums"BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Statistics: Posted by Hobbieman — Wed May 15, 2024 9:32 pm