# Import MicroPython libraries of PIN and SPI
from machine import Pin, SPI
# Import MicroPython max7219 library
import max7219
# Import time
import time
# Initialize the SPI
spi = SPI(0, baudrate=10000000, polarity=1, phase=0, sck=Pin(2), mosi=Pin(3))
ss = Pin(5, Pin.OUT)
# Create matrix display instance, which has four MAX7219 devices.
display = max7219.Matrix8x8(spi, ss, 4)
# Set the display brightness. Value is 1 to 15.
display.brightness(1)
# Define the static message
static_message = "001"
# Clear the display
display.fill(0)
# Write the static text to the display
display.text(static_message, 0, 0, 1)
# Show the display
display.show()
# Sleep to keep the message on the display
while True:
time.sleep(1) # Sleep indefinitely, adjust as needed