Jump to content

NodeMCU Projects: Difference between revisions

Line 468:
= MAX7219 based 8x8 LED Matrix =
 
Source: [https://github.com/vrialland/micropython-max7219 github.com]
 
*Download below Library and upload it to NodeMCU:
https://github.com/vrialland/micropython-max7219/blob/master/max7219.py
 
* Static Testing:
<syntaxhighlight lang="python">
from machine import Pin, SPI
Line 474 ⟶ 480:
spi = SPI(1, baudrate=10000000)
screen = max7219.Max7219(32, 8, spi, Pin(15))
screen.text('ABCD', 0, 0, 1) #
screen.show()
</syntaxhighlight>
 
* Command explaination
screen.text("ABCD",x,y,z)
 
ABCD = Text to be displayed
x = Horizontal Position
y = Vertical Position
 
* Scroll Text:
<syntaxhighlight lang="python">
for i in range(10):
screen.text("ABCD",i,0,1)
screen.show()
time.sleep(1)
screen.init_display()
</syntaxhighlight>
 
 
<br />
Cookies help us deliver our services. By using our services, you agree to our use of cookies.