MAX7219 LED Matrix Display Arduino Walkthrough & Test Code – Scrolling Text Code

///MAX7219 LED Matrix Display Arduino Walkthrough & Test Code – Scrolling Text Code

MAX7219 LED Matrix Display Arduino Walkthrough & Test Code – Scrolling Text Code

In a previous video, I unboxed the MAX7219 LED Matrix Display module I purchased. Since then, I had a chance to get the module up and running. I was extremely pleased to find an Arduino library for this module. It allowed me to quickly get some advanced displays implemented. I decided to create a simple walkthrough video in which I showcase this library and its functionality.

MAX7219 LED Matrix Display

MAX7219 LED Matrix DisplayThere are many different kinds of these modules floating around. Although they are all using the same driver (MAX7219), they have their own settings. The one I picked up for myself can be found below and features four distinct modules. Each module has a driver & an LED matrix on it. These modules are extremely versatile and allow the user to chain as many as needed through a functionality similar to shift registers. Simply connect the headers and your text will keep on scrolling.

Hardware & Software for the Project

You are going to need a few things for the project; you can find them through the following links:

The MAX7219 LED Matrix Display Arduino Library

As mentioned above, we will be leveraging two libraries which were written for these modules. The first one is MD_MAX72X; the second is is MD_Parola. You can find the links along with the documentation of the library below. You will need both of them to work with the display & I highly recommend looking at both of their Examples.

Note: you can easily download these libraries through the Arduino interface. Simply open the library manager and enter the names into the search bar.

Looking at a first example

Our first example will come from the pre-built example for the Parola library. The file can be found through the title “Parola_Print_Test”.
#define MAX_DEVICES 4
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
void setup(void)
void loop(void)
P.print(1234, DEC);
P.print(1234, HEX);
P.print(12.5); // float not supported by Arduino Print class
P.println("end"); // only get the /r/n characters - avoid using println

The code is nearly self-explanatory. However, it highlights some of the great features & capabilities from the library. The first step is to define the connections made to our MAX7219 LED Matrix Display which requires 3 pins, ground and 5v. We also define the number of modules we have connected in series. In my case, that number would be 4. Inside of our loop function, the library author showcases some examples of outputs you can utilize. You can display text, integers, time, characters, scrolling text and much more. Feel free to edit the example code to get your display running in seconds.

Second MAX7219 Display Parola example

The second example is slightly more complex. It allows the user to enter a text string through the serial monitor and will output the said string through the LED matrix display. The file can be found through the title “MD_MAX72_Message”.
Code not included here, but can be found under examples of the library

This example has many similarities to the previous one when it comes to the display. However, an important feature is added which allows you to communicate to the Arduino through the Serial Port. Once the string is read by the micro controller, it is sent out to the MAX7219 LED Matrix Display. Browse through the code and feel free to post your questions on the forum should you encounter any difficulties with it.

Conclusion – MAX7219 LED Matrix Display Arduino

Using the MAX7219 LED Matrix Display was a ton of fun. Libraries such as the ones we discussed above are the reason why I love this community. The author decided to invest his own time in order to create something accessible to anyone. You can download the code and get a project running in minutes.

Thank you for reading & watching,
– EEEnthusiast

By | 2017-06-17T16:57:16-07:00 June 18th, 2017|Arduino, Tutorials|1 Comment

About the Author:

Welcome to My name is Vlad, I'm an Electrical Engineer and I love to build and teach. I graduated in 2013 and have tried my best to share my electrical knowledge and experience with viewers and readers from all over the world. You can find me on my personal site or LinkedIn!

One Comment

  1. Tigor Banjarnahor May 18, 2018 at 4:35 pm

    Thank you very much, it is realy helpfull.

    Best Regards,

Leave A Comment

CommentLuv badge

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Show Buttons
Hide Buttons