How to use MAX7219 8x8 LED matrix display

Hi i can't find any examples how to use the 8x8 LED matrix display in node-red . I need help

try googling the chip name and node-red

can't find any flows

It's got an SPI interface, I couldn't find any SPI nodes. I2C would be easier for interfacing. Do you already have this module?

These would be easier to interface with:

1 Like

But there is a very large difference in price!

In the UK, the Adafruit stuff is expensive - £16 on amazon. Whereas the MAX7219 is available for between £2 and £4. Indeed, for less than £5 from China, you can get a 4x8x8.

The MAX7219 is actually the LED driver. It is well supported on the Arduino and if you know how to program an Arduino, you can now use the latest version of the Arduino IDE to write programmes for the Raspberry Pi as well so that is probably the best approach.

Possibly the easiest way to get started is to sign up for the new Cloud IDE.

https://www.techrepublic.com/article/raspberry-pi-powered-by-arduino-now-you-can-program-the-pi-using-arduino-sketches/

https://create.arduino.cc

Though there seem to be alternative ways as well:

https://www.raspberrypi.org/forums/viewtopic.php?t=134928

https://www.deviceplus.com/how-tos/raspberrypi-guide/how-to-run-arduino-sketches-on-raspberry-pi/

Not tried any of these yet as I don't use the GPIO on any of my Pi's at present.

1 Like

How do you interface it with node-red?

can i mix with node-red? i still have other applications using node-red also.

i found this but how to use it in node-red ?
https://www.npmjs.com/package/max7219

You would have to create a Node-RED wrapper for it - i.e. make a new node-RED node

i don't knw hw to do it

You need to work out how to include something like one of the Arduino MQTT libraries and get it to send the data to MQTT. Lots of other ways of course, that's only one.

If there is not a pre-built node-red node for it, and if you aren't familiar enough with node.js to create a node-red node that wwraps max7219, you may simply be out of luck. Sorry.

A possible alternative would be to access it via an arduino connected over serial to your device running Node-RED. But again, that assumes you'll know how to do that - I'm sure there will be easy-to-follow guides online for driving that device from an arduino.

You may be able to load it in your settings.js file, passing it to the global variables object. Then you can reference that in a function node.

That doesn't always work but it often will.

Think of this as a learning oppertunity!

Hi all,

I managed to make it work.


codes:
var max7219LedMatrix = require('node-max7219-led-matrix');
var max7219 = new max7219LedMatrix.max7219("/dev/spidev0.0");
max7219.letter('A');

Thank you for the guides and encouragements.

4 Likes

Hi...I accept you're looking at falling MAX7219's? Utilizing this component of the MAX7219 you can chain together different 7219's yet just utilize the three pins of SPI to control various units.

As I comprehend it works by associating DOUT from one 7219 to DIN of the following and 'passing along' parcels as they're gotten until CS goes high when all the gadgets follow up on their information. There are many gatherings talking about this online however this one aided make it 'click' for me.