This repository contains the code required to drive a max7219 8x8 LED matrix using a Raspberry Pi (with spidev
). The code written is extremely rigid and should not be used in any form of production applications.
pip install max7219-driver
The following are the table lists the connetion
LED | Physical Pin (Raspberry Pi) |
---|---|
VCC | 2 or 4 |
GND | 6 |
DIN | 19 |
CLK | 23 |
CS | 24 |
You can either modiy the test.py
file, or paste the max7219
folder into your project directory.
The following are the methods available.
bootstrap()
- Initialize the matrix to display fonts.CLEAR_DISPLAY()
- Clears the entire display.setBitmap(bitMap)
- Display the providedbitMap
. (Can be used to display special characters or symbols)show(string, delay = 0)
- Display the given string with a word delay of thedelay
.close()
- Closes thespi
connection