# How to use MAX7219 8x8 LED matrix display

**URL:** <https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967>\
**Category:** General\
**Created:** [8 September 2018 15:18 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967 "2018-09-08T15:18:27Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![mshaz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mshaz/32/2294_2.png) [@mshaz](https://discourse.nodered.org/u/mshaz)\
**Post date:** [8 September 2018 15:18 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/1 "2018-09-08T15:18:27Z")

</div>

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

 ![max](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/c67415dc2984bbe203a05a8deb0de4f68f4aa97f.jpeg)

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [8 September 2018 15:34 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/2 "2018-09-08T15:34:59Z")

</div>

try googling the chip name and node-red

---

<div class="post-metadata">

**Author:** ![mshaz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mshaz/32/2294_2.png) [@mshaz](https://discourse.nodered.org/u/mshaz)\
**Post date:** [8 September 2018 16:22 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/3 "2018-09-08T16:22:27Z")

</div>

> [@ukmoose](#):
>
> e and node-red

can't find any flows

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [8 September 2018 17:15 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/4 "2018-09-08T17:15:31Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [8 September 2018 17:19 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/5 "2018-09-08T17:19:00Z")

</div>

These would be easier to interface with:

> **[Adafruit Mini 8x8 LED Matrix w/I2C Backpack - Red](https://www.adafruit.com/product/870)**
>
> What's better than a single LED? Lots of LEDs! A fun way to make a small display is to use an 8x8 matrix or a 4-digit 7-segment display. Matrices like these are 'multiplexed' - so to control ...

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 September 2018 17:43 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/6 "2018-09-08T17:43:46Z")

</div>

> [@ghayne](#):
>
> These would be easier to interface with:

But there is a very large difference in price!

In the UK, the Adafruit stuff is expensive - [£16 on amazon](https://www.amazon.co.uk/Adafruit-Mini-8x8-Matrix-Backpack/dp/B00SK8K7MK). Whereas the MAX7219 is available for between £2 and £4. Indeed, for [less than £5 from China, you can get a 4x8x8](https://www.gearbest.com/raspberry-pi/pp_391811.html?wid=1433363&currency=GBP).

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://www.techrepublic.com/article/raspberry-pi-powered-by-arduino-now-you-can-program-the-pi-using-arduino-sketches/)

[https://create.arduino.cc](https://create.arduino.cc)

> **[Arduino Cloud - Getting started](https://create.arduino.cc/getting-started/)**
>
> Arduino Cloud Getting Started allows you easily to setup linux devices and get them running quickly.

Though there seem to be alternative ways as well:

[https://www.raspberrypi.org/forums/viewtopic.php?t=134928](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/](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.

---

<div class="post-metadata">

**Author:** ![mshaz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mshaz/32/2294_2.png) [@mshaz](https://discourse.nodered.org/u/mshaz)\
**Post date:** [8 September 2018 20:20 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/7 "2018-09-08T20:20:53Z")

</div>

How do you interface it with node-red?

---

<div class="post-metadata">

**Author:** ![mshaz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mshaz/32/2294_2.png) [@mshaz](https://discourse.nodered.org/u/mshaz)\
**Post date:** [8 September 2018 20:22 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/8 "2018-09-08T20:22:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mshaz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mshaz/32/2294_2.png) [@mshaz](https://discourse.nodered.org/u/mshaz)\
**Post date:** [8 September 2018 20:23 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/9 "2018-09-08T20:23:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [8 September 2018 21:30 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/10 "2018-09-08T21:30:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mshaz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mshaz/32/2294_2.png) [@mshaz](https://discourse.nodered.org/u/mshaz)\
**Post date:** [8 September 2018 22:43 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/11 "2018-09-08T22:43:30Z")

</div>

i don't knw hw to do it

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 September 2018 22:48 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/12 "2018-09-08T22:48:01Z")

</div>

> [@mshaz](#):
>
> can i mix with node-red? i still have other applications using node-red also.

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.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [8 September 2018 22:48 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/13 "2018-09-08T22:48:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 September 2018 22:50 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/14 "2018-09-08T22:50:17Z")

</div>

> [@mshaz](#):
>
> i found this but how to use it in node-red ?  
> [https://www.npmjs.com/package/max7219](https://www.npmjs.com/package/max7219)

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.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [8 September 2018 23:22 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/15 "2018-09-08T23:22:13Z")

</div>

Think of this as a learning oppertunity!

---

<div class="post-metadata">

**Author:** ![mshaz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mshaz/32/2294_2.png) [@mshaz](https://discourse.nodered.org/u/mshaz)\
**Post date:** [10 September 2018 18:12 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/16 "2018-09-10T18:12:52Z")

</div>

Hi all,

I managed to make it work.

> **[node-red-contrib-function-npm](https://www.npmjs.com/package/node-red-contrib-function-npm)**
>
> A function node for Node-RED with npm load capabilities

  

> **[node-max7219-led-matrix](https://www.npmjs.com/package/node-max7219-led-matrix)**
>
> Node max7216 led matrix interfacing for raspberry pi

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.

 ![A1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/ae2f631e52439e0bc2d380ca35e0be700ffc8407.jpeg)

 ![A](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f3bf2c012b64a6109d7f63ab54a86f80b6a31466.jpeg)

---

<div class="post-metadata">

**Author:** ![LevDower](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@LevDower](https://discourse.nodered.org/u/LevDower)\
**Post date:** [3 February 2021 15:45 UTC](https://discourse.nodered.org/t/how-to-use-max7219-8x8-led-matrix-display/2967/17 "2021-02-03T15:45:44Z")

</div>

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.
