Use max7219 seven segment displays with Excamera Labs SPIDriver
For SPIdriver specific help or ordering information:
https://github.com/jamesbowman/spidriver • https://www.spidriver.com
pip3 install spidriver
- SPIdriver 5V -> Display VCC
- SPIdriver GND -> Display GND
- SPIdriver MOSI -> Display Data In (DIN/DI)
- SPIdriver CS -> Display CS
- SPIdriver SCK -> Display CLK
If you want to daisy-chain multiple displays, use standard Dupont cables from the output ports on the first display to the corresponding inputs on the next (and so on).
To test basic display output:
python3 max7219.pyOr use in Python 3.x like:
from max7219 import MAX7219
SPIDRIVER_PORT = "/dev/cu.usbserial-DK0EI9RZ"
NUMBER_OF_DISPLAYS = 2
NOOP = 0x00
disp = MAX7219(SPIDRIVER_PORT, intensity=7) # intensity is the brightness level, from 0-15
# Writes "1" to position 7 (far left) on the first (0) display:
disp.write_digit(0, 7, 1)
# Writes "L" to position 1 (far right) on the second (1) display:
disp.write_digit(1, 1, 0x7D)
# Clears the display:
disp.clear()