Breaking

Enhance Raspberry Pi 5 with Adafruit PioMatter: HUB75 RGB LED Matrix Support

The Raspberry Pi 5 features improved performance due to its upgraded CPU, GPU, and quicker I/O capabilities. Nonetheless, this progress brought about a challenge: the conventional technique for driving HUB75 RGB LED matrices became unsuitable due to the transition in GPIO control from the Broadcom processor to the RP1 peripheral controller.

Adafruit created the PioMatter library to tackle this issue, utilizing the Programmable I/O (PIO) blocks found in the RP1 chip—akin to those in the RP2040 microcontroller. This advancement enables the management of HUB75 RGB LED matrices using the Raspberry Pi 5. The GitHub platform hosts the PioMatter library.



The instructions to install the Adafruit Blinka Raspberry Pi 5 PioMatter library (or just PioMatter for short) can be found on Adafruit Learn. Once you have installed the RGB Matrix Bonnet or RGB Matrix HAT to the Raspberry Pi 5, and connected a HUB75 RGB matrix, you can install the library as follows on Raspberry Pi OS:

1

2

3

4

5

6

python -m venv ~/venvs/blinka_venv

source ~/venvs/blinka_venv/bin/activate

pip install adafruit-blinka

pip install pillow

pip install numpy

pip install Adafruit-Blinka-Raspberry-Pi5-Piomatter

You’ll also need to add the PIO subsystem rule configuration by editing /etc/udev/rules.d/99-com.rules:

1

SUBSYSTEM=="*-pio", GROUP="gpio", MODE="0660"


After a reboot, you should be OK to run some commands from the terminal to drive your HUB75 RGB matrix. For example, the script below will draw a square, a circle, and a triangle:

1

python single_panel_simpletest.py


Adafruit Learn has more examples explaining how to play a GIF, run scrolling text, mirror the serial console, and even play MP4 videos like Big Buck Bunny as shown in the video below.

Please note that the PioMatter library is currently in its alpha stage, so you might encounter some bugs. If you're interested in alternative solutions, the Pimoroni Interstate 75 W (RP2040) board is designed for HUB75 LED matrix panels, though playing MP4 videos on it can be more challenging.

By integrating the PioMatter library, the Raspberry Pi 5 regains its capability to drive HUB75 RGB LED matrices, opening up new possibilities for creative projects and displays.

This article is inspired by the original coverage from CNX Software


Popular Posts