The problem is we are asked/told to adjust our thinking about everything:
- The Hardware is changing every two years or so
- Hardware-OS interface philosophy changes every few years
- The Operating Systems are advancing every year, (2 years for Long Term Support versions)
- The Programming Languages introduce major changes every 5 to 10 years
- System management environments and practices (build, configuration management, repositories): 3-5 years
- Product APIs have to keep up with all the above changes
- Domain environments are changing every year (ROS, TensorFlow, Keras, PyTorch, OpenCV)
In this particular case where the GoPiGo3 C++ API was much less packed with features than the Python API, it turned out to be easier to get “Hello World” and the GoPiGo3 motors to work on the Pi5.
I am not aware of the reason the GoPiGo3 Python API needs the pigpiod package or GPIO bit twiddling in the API.
For Reference This is the GoPiGo3 GPIO pin usage that I am aware of:
GoPiGo3 - Raspberry Pi Interface
13v3: RPI+3v3
2:5V: 5V supply
3:GPIO2: SDA_3v3
4:5V: 5V supply
5:GPIO3: SCL_3v3
8:GPIO14: RPI_TX
10:GPIO15: RPI_RX
12:GPIO18: RPI_RESET
15:GPIO22: RPI_Shutdown (button)
16:GPIO23: RPI_RUNNING
18:GPIO24: RPI_SWDIO
19:GPIO10: RPI_MOSI
21:GPIO9: RPI_MISO
22:GPIO25: RPI_SWDCLK
23:GPIO11:RPI_SCK
26:GPIO7: RPI_SS
For GPIO22/23 (“GoPiGo3 Power Management”) the Python package RPI.GPIO was used which is supported on the Pi4, but not on the Pi5. The new package gpiod was not well documented that I could find, but since the power management routine was only 6 lines, it was reasonably easy to port.
I didn’t feel I could port the entire GoPiGo3 Python API for a feature I didn’t know how it is used, and thus didn’t know how I would test the port. My method for porting to Bookworm was to remove anything that broke. I didn’t know how to remove stuff that breaks without knowing what it does.