Raspberry Pi

rpi-rgb-led-matrix

Working with RGB LED matrices requires to install a base driver software. We are using the incredibly versatile rpi-rgb-led-matrix. Here are our development notes on installation.

led matrix

Installation

Installation is perfectly covered on the main page of rpi-rgb-led-matrix. We have distilled our approach below. The guide installs rpi-rgb-led-matrix for use with Python 3 and our library for handling RGB matrices (coming soon)

Pre-requisites

# setup pre-requisites for rpi-rgb-led-matrix
sudo apt-get update

sudo apt install libgraphicsmagick++-dev libwebp-dev
sudo apt install libgraphicsmagick++-dev libwebp-dev -y
sudo apt install libwebp-dev
sudo apt install python2.7-dev python-pillow -y

# download the project
git clone https://github.com/hzeller/rpi-rgb-led-matrix

# build the project using the standard hardware profile (change based on your hardware)
cd rpi-rgb-led-matrix
sudo HARDWARE_DESC=regular make install-python

cd utils/
sudo make led-image-viewer

cd ../examples-api-use
make

If you wish to use Python 3 (recommended), navigate to the bindings/python directory, and compile for Python 3. More documentation here

sudo apt-get update && sudo apt-get install python3-dev python3-pillow -y
make build-python PYTHON=$(which python3)
sudo make install-python PYTHON=$(which python3)

Run Demos

To run the basic demo and test your installation:

cd rpi-rgb-led-matrix/examples-api-use
 sudo ./demo -D -m 0 --led-no-hardware-pulse --led-gpio-mapping=adafruit-hat

Navigate to the project python folder to run Python demos

cd rpi-rgb-led-matrix/bindings/python/samples
sudo ./runtext.py
# run other demos available in this directory

Hardware

Here is a bunch of links and descriptions for hardware: matrices and hats

Tools

You might need some of the tools below to manage your development

  • IrfanView - a lightweight image viewer. In our case, it supports PPM files. Both viewing and saving (save-as)
  • Gimp - used to generate PPM files. If you take art creation seriously, this is the tool to use. For simple conversions, IrfanView should be enough