Connecting an LED matrix display to the RPZ
Operating one LED is fun for about a minute, but what if you want to do some really interesting things, or operate a matrix of LEDs?
Getting ready
You'd need some kind of LED matrix. There were two different matrices I tried out. The first was Adafruits's 8x8 LED display, but there was also an 8x8 LED display included in my Elego Complete Starter Kit.
Aside from that, you really only need jumper wires and Python. The 8x8 matrix commonly uses a max7219
driver. Install the Python driver library with pip:
sudo pip install max7219
How to do it...
There are five pins on the LED matrix, which use your Raspberry Pi Zero's SPI interface. Connect the matrix to the RPZ as shown here:
There is a great library for interfacing an 8x8 matrix using a
max7219
driver in Python, appropriately namedmax7219
. With this, it is easy to write messages or light any LED in the matrix.You can make a messaging program in just a few lines! Create a program named
maxtix8x8.py...