from machine import Pin, SoftSPI
from max7219 import Matrix8x8
from time import sleep

sck = Pin(27, Pin.OUT)
cs = Pin(26, Pin.OUT)
mosi = Pin(25, Pin.OUT)
miso = Pin(19, Pin.IN)
spi = SoftSPI(baudrate = 1000000, polarity = 0, phase = 0, sck = sck, mosi = mosi, miso = miso)

display = Matrix8x8(spi,cs,4)
display.brightness(2)

display.fill(0)
display.text('Hola', 0, 0, 1)
display.show()
sleep_ms(2000)

display.fill(0)
display.text('Como', 0, 0, 1)
display.show()
sleep_ms(2000)

display.fill(0)
display.text('estas', 0, 0, 1)
display.show()
sleep_ms(2000)