from machine import Pin, SPI
import time
import max7219
CS = Pin(12)
DIN = Pin(13)
CLK = Pin(14)
hspi = SPI(1, 10000000, sck=CLK, mosi=DIN)
display = max7219.Matrix8x8(hspi, CS, 4)
display.brightness(2) #range 0-15
while 1:
for i in range(10):
display.fill(0)
display.text(str(i), 0, 0, 1) #display.text(str, x, y, col=1)
display.show()
time.sleep_ms(250)
for i in range(ord('A'), ord('Z')+1): #1-26
display.fill(0)
display.text(chr(i), 0, 0, 1)
display.show()
time.sleep_ms(250)