Home Code Raspberry Pi 8×8 LED matrix example

Raspberry Pi 8×8 LED matrix example

by shedboy71

In this example we will connect one of the popular 8×8 LED matrix modules that can be found at low cost on various web sites. These commonly use a MAX7219

8x8 matrix module

8×8 matrix module

Here is how to connect this to your Raspberry Pi

Board Pin Name RPi Pin RPi Function
1 VCC 2 5V0
2 GND 6 GND
3 DIN 19 GPIO 10 (MOSI)
4 CS 24 GPIO 8 (SPI CE0)
5 CLK 23 GPIO 11 (SPI CLK)

Layout

 

pi and max7219

pi and max7219

Code

You can get a library for this, here are the steps to install it.

OPen a terminal window and type the following

[codesyntax lang=”bash”]

git clone https://github.com/rm-hull/max7219.git
cd max7219
sudo python setup.py install

[/codesyntax]

Now run the 8×8 led test example from the terminal window

[codesyntax lang=”bash”]

cd examples
sudo python matrix_test.py

[/codesyntax]

 

Links

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More