from machine import Pin, SPI, ADC
import max7219
from utime import sleep
MAX7219_NUM = 1
MAX7219_INVERT = False
MAX7219_SCROLL_DELAY = 0.15
cs_pin = 5
spi = SPI(0)
display = max7219.Matrix8x8(spi=spi, cs=Pin(cs_pin), num=MAX7219_NUM)
display.brightness(2)
while True:
text = "I <3 U"
for p in range(MAX7219_NUM * 8, len(text) * -8 - 1, -1):
display.fill(MAX7219_INVERT)
display.text(text, p, 1, not MAX7219_INVERT) # Display in the x, y position(string, x, y, color=1)
display.show()
sleep(MAX7219_SCROLL_DELAY)