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...

  1. 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:

  2. There is a great library for ...

Get Raspberry Pi Zero Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.