from machine import Pin, SPI
import max7219
DIN_PIN = 7
CS_PIN = 4
CLK_PIN = 6
TEXT_VAL = "*** Hello World ***"
spi = SPI(0,
baudrate = 10000000,
polarity = 0,
phase = 0,
sck = Pin(CLK_PIN, Pin.OUT),
mosi = Pin(DIN_PIN, Pin.OUT))
ss = Pin(CS_PIN, Pin.OUT)
display = max7219.Matrix8x8(spi, ss, 4, len(TEXT_VAL))
display.text(TEXT_VAL)
display.show()
while True:
display.scrollText(.075, False, 2)