Raspberry Pi 2 and an 8×8 LED matrix

As part of my arduino/general microcontroller development I purchase a variety of interesting boards and modules, oneof these is a 8×8 LED array which is controlled by a MAX7219. these modules are low cost and are nice for beginners level projects, you can display text, numbers and characters amongst other things.

Here is a typical module

max7219 8x8 matrix
max7219 8×8 matrix

To make life easy there is a python module already available with a couple of examples. Open up a console window and type in the following

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

You connect the module to you Raspberry Pi as follows, the Gnd (39) is for a Raspberry Pi 2. You can use another Gnd connection for another model.

Pi GPIO headerPin Number8×8 module
CS0 / GPIO 824CS

Create a file called test.py, I created this in the Examples folder of the max7219. Enter the following code using your favourite text editor


#!/usr/bin/env python
import max7219.led as led
device = led.matrix(cascaded=1)


Save and run the example by typing the following in at the command line

sudo python max7219/examples/test.py




MAX7219 Dot Led Matrix Module MCU LED Display Control New Module Kit For Arduino

5pcs/lot MAX7219 Module Dot Matrix Modules for Arduino Control FZ0148 Free Shipping Dropshipping