2.1k
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
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
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
Links