Page 4 of 5

Re: Anyone working on a MAX7219 8x8 LED matrix display library?

Posted: Mon Dec 02, 2019 3:00 pm
by DJShadow1966
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

Re: Anyone working on a MAX7219 8x8 LED matrix display library?

Posted: Mon Dec 02, 2019 5:53 pm
by jgbrown
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

Re: Anyone working on a MAX7219 8x8 LED matrix display library?

Posted: Wed Dec 04, 2019 8:43 am
by DJShadow1966
Hello Jeff
Many thanks for that got it all sorted.
Mike

Problem getting MAX7219 Matrix display to work

Posted: Tue Jul 21, 2020 6:32 pm
by tgs901
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

Re: Anyone working on a MAX7219 8x8 LED matrix display library?

Posted: Tue Jul 21, 2020 7:47 pm
by jgbrown
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

Re: Anyone working on a MAX7219 8x8 LED matrix display library?

Posted: Wed Jul 22, 2020 12:45 am
by tgs901
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

Re: Anyone working on a MAX7219 8x8 LED matrix display library?

Posted: Wed Jul 22, 2020 12:51 am
by tgs901
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

Re: Anyone working on a MAX7219 8x8 LED matrix display library?

Posted: Wed Jul 22, 2020 10:13 pm
by jgbrown
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

Re: Anyone working on a MAX7219 8x8 LED matrix display library?

Posted: Thu Aug 27, 2020 1:33 pm
by easylab4kids
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

Re: Anyone working on a MAX7219 8x8 LED matrix display library?

Posted: Tue Sep 29, 2020 7:00 pm
by srihari154
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