from machine import Pin, SPI
from max7219 import Matrix8x8
spi = SPI(0, baudrate=10000000, polarity=1, phase=0, sck=Pin(18), mosi=Pin(23))
ss = Pin(5, Pin.OUT)
display = Matrix8x8(spi, ss, 4)
# change brightness 1-15
display.brightness(5)
# clear display
display.zero()
display.show()
# show text using FrameBuffer's font
display.text("CODE")
display.show()