Hello Rui/Sara, I'm trying to learn the basics of MicroPython. I'm currently working on an example "scrolling text with LED matrix". Here is my program
from machine import Pin, SPI, ADC
import max7219
from utime import sleep
MAX7219_NUM = 1
MAX7219_INVERT = False
MAX7219_SCROLL_DELAY = 0.15
cs_pin = 5
spi = SPI(0)
display = max7219.Matrix8x8(spi=spi, cs=Pin(cs_pin), num=MAX7219_NUM)
display.brightness(2)
while True:
text = “Hello World!”
for p in range(MAX7219_NUM * 8, len(text) * -8 – 1, -1):
display.fill(MAX7219_INVERT)
display.text(text, p, 1, not MAX7219_INVERT) # Display in the x, y position(string, x, y, color=1)
display.show()
sleep(MAX7219_SCROLL_DELAY)
I use a library from GitHub “https://github.com/mcauser/micropython-max7219”. I copied the library max7219 into a LIB folder on the Raspi. Unfortunately I can’t see my text on the LED matrix, only areas of red LEDs light up. No idea where the error is. Do you have an idea?
Thank you and best regards ULLI