Open brickbots opened 11 months ago
From https://forums.raspberrypi.com/viewtopic.php?t=361218:
RPi.GPIO, wiringPI, and pigpio do not work on the Pi5 which has new hardware for the GPIO.
Yikes.. Also see https://sourceforge.net/p/raspberry-gpio-python/tickets/214/
Have you tried a simple RPI.GPIO script on rpi5, e.g. a blinking led and does that work?
Thank you! Yes I've tried and no it does not work... I've played a little bit with GPIOD and it's related python bindings, which seems to be the method that people are coalescing around. It theoretically works for RPI 3/4/5 and is fairly quick.... but I've not seen anything about SPI or I2C comms using that framework, just raw GPIO on/off.
I'll keep looking and if I can figure out the 'new' way to do SPI, maybe work on a PR. Just mainly wanted to see if anyone else had jumped into this yet or if there was some more clearcut solution.
I wasn't in a rush to get a new Pi5 so haven't run into the issue yet but surprised that no one posted a bug report before, also didn't see anything on twitter etc. Releasing a new Pi without RPI.GPIO etc software support is quite strange by rpi foundation.
Agreed... even if the underlying hardware and memory mapping has changed, you'd think there could be some wedge or abstraction to allow most (all?) of the existing GPIO code to work....
Thank you for taking the time to think about this, and for the incredible Luma project. If it's okay with you, I'll keep this open as a reminder to keep checking back on the state of play for python/spi bindings.
I just tested gpiozero as an alternative to RPi.GPIO for my project little-backup-box for the Raspberry Pi 4 and 5. This works for me on both the old and new hardware. However, I only tested it with inputs (buttons), not with outputs.
Hello!
I'm working to port some working code to bookworm on a Raspberry Pi 5. This code works great on bookworm/RPI4, but with the RPI5 it's not able to initialize the SPI interface from the luma.core.interface.serial module.
Perhaps this is due to the new hardware controller on the 5?
Type of Raspberry Pi
Raspberry Pi 5
Linux Kernel version
Bookworm Linux pifinder 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
Expected behaviour
I'm trying to initialize a waveshare 1.5" RGB OLED display based on the ssd1351 controller. Communication is via SPI
Actual behaviour
Crashes with the error below