moving back to raspberry pi os on the raspberry pi 5

HiLetgo MAX7219 Dot Matrix Module attached to a Raspberry Pi connector

You’re looking at a very simple circuit diagram, where I’ve wired a HiLetgo MAX7219 Dot Matrix Module to the Raspberry Pi 5 via its 40 pin connector. In spite of the add for the module on Amazon (see below) it works just fine with the Raspberry Pi and a Python library, Luma.LED_Matrix, I found on the web (see links below).

Amazon entry for HiLetgo module

All I wanted to do was hook up one of these inexpensive four-character modules to a Raspberry Pi 5 and scroll text across it using Luma.LED_Matrix. It does not work with Ubuntu 23.10. It works just fine with the latest release of Debian GNU/Linux 12, a.k.a. Raspberry Pi OS. The problem is that Ubuntu 23.10 does not enable the SPI kernel drivers. Raspberry Pi OS does.

All SPI devices under Raspberry Pi OS on Raspberry Pi 5

The screen capture above shows what the SPI devices will appear as in the dev file system if the kernel drivers are properly configured for the SPI peripherals. When you try this on Ubuntu all that is shown is /dev/spidev10.0. The other two devices are missing.

There’s not much more to say at this point except I am extremely aggravated to have to back down to Raspberry Pi OS. Ubuntu 23.10 is a gorgeous UI and a highly performant distribution on the Raspberry Pi 5. Getting it set up was no different than on an x86-64 system, and once set up was indistinguishable from normal Ubuntu. All the tools worked, especially Visual Studio Code, and I was developing command line tools written in Rust. It was a breeze doing anything non-trivial. Until I tried physical computing, at which point Ubuntu’s limitations in those areas became evident.

It’s not a problem to physically switch between operating systems. I just don’t want to, and based on my experience so far with Ubuntu 23.10, I will be dragged back kicking and screaming to Raspberry Pi OS on the Raspberry Pi 5. As soon as I can come up with a good solution to this mess, I’ll post it.

Links

Luma.LED_Matrix — https://github.com/rm-hull/luma.led_matrix

moving back to raspbian 64 bit, dropping work on wiringpi

report #3 on using ubuntu 23.10 with a raspberry pi 5 — blinkin’ lights

This is the third (an extremely short) post concerning my use of a Raspberry Pi 5, this time trying out some very simple physical programming; blinking four LEDs in quick sucession. Note that this is based on the setup performed in the prior two posts. The very basic schematic at the top of this post illustrates four individual LEDs connected to four different GPIO pins on the Raspberry Pi 5 GPIO connector. Using gpiozero with Python 3 (3.11.6 as of the date of this post) and the following script, I illuminate four individual LEDs in quick succession, then sleep two seconds before starting again.

#!/usr/bin/env pythonfrom gpiozero import LEDfrom time import sleepled1 = LED(22)led2 = LED(23)led3 = LED(24)led4 = LED(25)while True:led1.on()sleep(.05)led1.off()sleep(.05)led2.on()sleep(.05)led2.off()sleep(.05)led3.on()sleep(.05)led3.off()sleep(.05)led4.on()sleep(.05)led4.off()sleep(2)

The code is uniquely simple in that all I have to do is assign four LEDs to four pins, and then I can turn each one on and off.

I chose the specific GPIO pins for this example in part because they’re physically close together on the connector, and because internally they’re also logically close together (i.e. GPIO22 to GPIO25, in succession).

I’m also back on the KiCad train for good, finally, so that I won’t have to waste time remembering/relearning basic abilities to create schematics for what I physically design. I hope my drawings become clearer fairly quickly.