adriangoris / max7219_8digit

Micropython driver for the max7219 with 8 x 7segment display

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a micropython library for MAX7219 + 8 x 7digit display boards.

I have tested it with an ESP8266 running micropython.

Requires a minimum of three spare GPIO lines to run SPI.

Example of use:

# Connections:
# SCK (CLK) -> GPIO4
# MOSI (DIN) -> GPIO2
# SS (CS) -> GPIO5

from machine import Pin, SPI
import max7219_8digit

spi = SPI(-1, baudrate=100000, polarity=1, phase=0, sck=Pin(4), mosi=Pin(2))
ss = Pin(5, Pin.OUT)

display = max7219_8digit.Display(spi, ss)
display.write_to_buffer('12345678')
display.display()

About

Micropython driver for the max7219 with 8 x 7segment display

License:GNU General Public License v3.0


Languages

Language:Python 100.0%