# Import MicroPython libraries of PIN and SPI
from machine import Pin, SPI
# Import MicoPython max7219 library
import max7219
# Import time
import time
#Intialize the SPI
#spi = SPI(0, baudrate=10000000, polarity=1, phase=0, sck=Pin(2), mosi=Pin(3))
spi = SPI(0, sck=Pin(2), mosi=Pin(3))
ss = Pin(5, Pin.OUT)
# Create matrix display instant, which has four MAX7219 devices.
display = max7219.DotMatrix(spi, ss, 1)
#Set the display brightness. Value is 1 to 15.
display.setBrightness(10)
display.fill(0)
# Write the scrolling text in to frame buffer
display.text("1234" ,0,0,1)
#Show the display
display.show()