Anyone working on a MAX7219 8x8 LED matrix display library?
-
- Posts: 60
- Joined: Sun Jun 23, 2019 4:55 am
- Location: Gateshead, Tyne and Wear
Re: Anyone working on a MAX7219 8x8 LED matrix display library?
Hello
I did the changes as above, but now I get a solid line accross the top of the display, when I undo the changes apart from each image 180 degress out I have no problems.
Can you please advise.
Regards Mike
I did the changes as above, but now I get a solid line accross the top of the display, when I undo the changes apart from each image 180 degress out I have no problems.
Can you please advise.
Regards Mike
Re: Anyone working on a MAX7219 8x8 LED matrix display library?
Here's a link to the repository so you can use the exact file to alleviate chances of typo's, etc....and in case I made any last minute changes.
https://github.com/jgbrown32/ESP8266_MAX7219
-- Jeff
https://github.com/jgbrown32/ESP8266_MAX7219
-- Jeff
-
- Posts: 60
- Joined: Sun Jun 23, 2019 4:55 am
- Location: Gateshead, Tyne and Wear
Re: Anyone working on a MAX7219 8x8 LED matrix display library?
Hello Jeff
Many thanks for that got it all sorted.
Mike
Many thanks for that got it all sorted.
Mike
Problem getting MAX7219 Matrix display to work
I'm a MicroPython newbie and I'm trying to get Jeff Brown's example code to run on an ESP8266 board using uPyCraft v 1.1 and MicroPython v1.12 on 2019-12-20; ESP module with ESP8266.
I can run the blink.py script with no problem. So I believe I have the board configured correctly in uPyCraft.
The max7219 4up matrix board is wired per the chart and has been tested on an arduino to work correctly.
I copied the max7219.py and example files from https://github.com/jgbrown32/ESP8266_MAX7219 so as not to make a typo.
Example: 'ESP8266_8x8_x4_test.py'
from machine import Pin, SPI
import max7219
spi = SPI(1, baudrate=10000000)
display = Max7219(width, height, spi, cs, rotate) # line 5
# width = total width of display in pixels
# height = total height of display in pixels
# spi = SPI bus
# cs = cs (Chip Select) pin on ESP8266
# rotate = rotate display 180 degrees (Optional; default = True)
display = Max7219(8, 8, spi, Pin(15)) # line 11
display.text('A', 0, 0)
display.show()
# display.marquee(msg_to_display)
display.marquee("This is my message")
When I run the example I get :
exec(open('./ESP8266_8x8_x4_test.py').read(),globals())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 5, in <module>
NameError: name 'Max7219' isn't defined
line 5 is: display = Max7219(width, height, spi, cs, rotate)
if I comment out line 5 (display = Max7219(width, height, spi, cs, rotate)), I get:
exec(open('./ESP8266_8x8_x4_test.py').read(),globals())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 11, in <module>
NameError: name 'Max7219' isn't defined
line 11 is: display = Max7219(8, 8, spi, Pin(15))
I've tried importing max7219 and get no errors with that.
I've spent several hours on the web and can't find any reference to this specific problem.
Can someone give me an idea how to troubleshoot this?
Thank you
Tim
I can run the blink.py script with no problem. So I believe I have the board configured correctly in uPyCraft.
The max7219 4up matrix board is wired per the chart and has been tested on an arduino to work correctly.
I copied the max7219.py and example files from https://github.com/jgbrown32/ESP8266_MAX7219 so as not to make a typo.
Example: 'ESP8266_8x8_x4_test.py'
from machine import Pin, SPI
import max7219
spi = SPI(1, baudrate=10000000)
display = Max7219(width, height, spi, cs, rotate) # line 5
# width = total width of display in pixels
# height = total height of display in pixels
# spi = SPI bus
# cs = cs (Chip Select) pin on ESP8266
# rotate = rotate display 180 degrees (Optional; default = True)
display = Max7219(8, 8, spi, Pin(15)) # line 11
display.text('A', 0, 0)
display.show()
# display.marquee(msg_to_display)
display.marquee("This is my message")
When I run the example I get :
exec(open('./ESP8266_8x8_x4_test.py').read(),globals())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 5, in <module>
NameError: name 'Max7219' isn't defined
line 5 is: display = Max7219(width, height, spi, cs, rotate)
if I comment out line 5 (display = Max7219(width, height, spi, cs, rotate)), I get:
exec(open('./ESP8266_8x8_x4_test.py').read(),globals())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 11, in <module>
NameError: name 'Max7219' isn't defined
line 11 is: display = Max7219(8, 8, spi, Pin(15))
I've tried importing max7219 and get no errors with that.
I've spent several hours on the web and can't find any reference to this specific problem.
Can someone give me an idea how to troubleshoot this?
Thank you
Tim
Re: Anyone working on a MAX7219 8x8 LED matrix display library?
Hi Tim --
It's been a while since I've done anything with this, but there may be a typo in the code. For line 5, try:
display = max7219.Max7219(width, height, spi, cs, rotate)
Let me know if that works.
-- Jeff
It's been a while since I've done anything with this, but there may be a typo in the code. For line 5, try:
display = max7219.Max7219(width, height, spi, cs, rotate)
Let me know if that works.
-- Jeff
Re: Anyone working on a MAX7219 8x8 LED matrix display library?
Hi Jeff,
Now I get this:
.....
download ok
exec(open('./ESP8266_8x8_x4_test.py').read(),globals())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 5, in <module>
NameError: name 'width' isn't defined
>>>
Tim
Now I get this:
.....
download ok
exec(open('./ESP8266_8x8_x4_test.py').read(),globals())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 5, in <module>
NameError: name 'width' isn't defined
>>>
Tim
Re: Anyone working on a MAX7219 8x8 LED matrix display library?
Hi Jeff,
I think I've figured it out.
line 5 should be a comment.
line 10 should have your fix in it
line 5 --> #display = max7219.Max7219(width, height, spi, cs, rotate)
line 10 --> display = max7219.Max7219(32, 8, spi, Pin(15),4)
Now it works.
Thank you
Tim
I think I've figured it out.
line 5 should be a comment.
line 10 should have your fix in it
line 5 --> #display = max7219.Max7219(width, height, spi, cs, rotate)
line 10 --> display = max7219.Max7219(32, 8, spi, Pin(15),4)
Now it works.
Thank you
Tim
Re: Anyone working on a MAX7219 8x8 LED matrix display library?
Thanks Tim...you are right. I went directly to main.py and saw your syntax error and replied. I have updated the README with your feedback so hopefully it doesn't trip anyone else up.
-- Jeff
-- Jeff
-
- Posts: 20
- Joined: Mon Aug 12, 2019 10:58 am
- Location: Ellisras, Suid-Afrika ("South Africa")
Re: Anyone working on a MAX7219 8x8 LED matrix display library?
I created a Chuck Norris scroller using the lib, with NodeRed + ESP8266 + Rasspberry Pi. Thanks!
See code here -->https://github.com/pappavis/micropython ... oller-mqqt
See code here -->https://github.com/pappavis/micropython ... oller-mqqt
met vriendelijke groet,
Easylab4kids.nl
Easylab4kids.nl
-
- Posts: 2
- Joined: Sun Sep 27, 2020 5:46 pm
Re: Anyone working on a MAX7219 8x8 LED matrix display library?
Hello Folks,
Need your help with a wierd issue.
I have the following connection between Nodemcu and Max7219(8*32)
ESP8266-->MAX7219
5V-->VCC
GND-->GND
D7 (GPIO13)-->DIN
D8 (GPIO15)-->CS
D5 (GPIO14)-->CLK
The problem is with this line of the code
spi = SPI(1, baudrate=10000000)
The moment this is execute the above line of code all the LED`s turn on RED and stay that way until the Nodemcu is powered off. clicking the restart(rst) button on the Nodemc does not help. power off and on is the only way out.
I have tried with various different combination of parameters including of trying the default 80Mhz Baud rate, but all the Led`s just stay on.
The connections are as per the requirement of he Hardware SPI, Hence not sure what's going wrong here.
Another observation is : After the LED`s are On, in case I unplug the power only to the display(Nodemcu is still on), the subsequent part of he codes all work fine, including the scroll function. However this is not a practical solution. Hence need guidance from the experts here.
Please Advice.
Regards
Srihari
Need your help with a wierd issue.
I have the following connection between Nodemcu and Max7219(8*32)
ESP8266-->MAX7219
5V-->VCC
GND-->GND
D7 (GPIO13)-->DIN
D8 (GPIO15)-->CS
D5 (GPIO14)-->CLK
The problem is with this line of the code
spi = SPI(1, baudrate=10000000)
The moment this is execute the above line of code all the LED`s turn on RED and stay that way until the Nodemcu is powered off. clicking the restart(rst) button on the Nodemc does not help. power off and on is the only way out.
I have tried with various different combination of parameters including of trying the default 80Mhz Baud rate, but all the Led`s just stay on.
The connections are as per the requirement of he Hardware SPI, Hence not sure what's going wrong here.
Another observation is : After the LED`s are On, in case I unplug the power only to the display(Nodemcu is still on), the subsequent part of he codes all work fine, including the scroll function. However this is not a practical solution. Hence need guidance from the experts here.
Please Advice.
Regards
Srihari