MAX7219 LED matrix Arduino scrolling text with ‘LIVE’ speed and direction control!
All my content is free.
If you feel that my videos are helping and you would like to contribute, you can toss some coins in the Tip Jar via PayPal.
Select amount then click the “Donate” button.
Quite a while ago, I did a tutorial on how to create Scrolling Text using a MAX7219 LED Matrix and an Arduino.
It worked, but the library I used at the time was very limited and hard to modify how the text scrolls across multiple matrix modules.
So I decided to make this new tutorial but this time using a more flexible library which provides more options.
The library in question is the ‘Parola’ library by MajicDesigns.
In this tutorial I will use six MAX7219 LED matrix linked together with a slider potentiometer to control the direction and speed of the scrolling text in real time.
The MAX7219 modules I’m using, have two sets of five pins, IN and OUT, you connect IN pins of the first module to the Arduino and then connect the OUT pins to the IN pins of another modules.
The MAX7219 matrix modules communicate using the SPI protocol so we need to use specific pins. Since we are using the Arduino UNO for this tutorial the SPI pins are located at 10 (SS), 11 (MOSI) and 13 (SCK).
These modules by themselves don’t require much current, about 150mA, but we are using six of them in this tutorial, and when all the Led’s are lit up, the current goes up to 900mA, so we need to use an external 5V power supply.
*note: The UNO if powered by USB can supply up to 500mA, if you power it using the DC jack with an external power supply, it can supply up to 1Amp. Since 900mA is pretty close to the limit, I decided to power the Matrix module with an external 5V 2A power supply separate from the UNO which I powered using a simple USB cable from my computer.
The Slider potentiometer has two sets of 3 pins, (OTA and OTB), both set do the same thing and you can use any one of them.
The connections are as follow:
For the Slider:
5V and GND of the UNO are going to VCC and GND of the OTA set of the Slider.
A0 of the UNO connects to the OTA of the Slider.
For the LED Matrix we are using the IN pins of the right most module:
Pin 10 (SS) of the UNO is connected to right most Matrix CS pin.
Pin 11 (MOSI) is connected to the DIN pin.
and pin 13 (SCK)is connected to the CLK pin.
After that the OUT pins of one Matrix is connected with jumpers to the IN pins of the next module.
The Parola library as a dependency and requires additional library MD_MAX72xx Arduino library
This library has support for many different types or models of LED Matrix.
So you need to edit the library file to set the right setting to select the Led Matrix you are using.
For more information on what file to edit in the library have a look at the tutorial video.
To simplify the code, instead of using the Serial Monitor to enter the desired text to be displayed on the Led Matrix, we will enter the message to be displayed inside the code itself.
The slider pot value is used to decide the direction and speed of the scrolling. When it sits in the middle the text will scroll slowly, if we move it to the right or left, then the text will start scrolling in that direction and the more we slide the speed will be increased.
The Parola library has many many more options you can experiment with, like fading, scrolling up and down, so I invite you to take a more in depth look at all the options available if you want to experiment further.
As always for more information about the tutorial and explanation of the code please watch our tutorial video.
Copy the above Sketch code you want to use above in your Arduino IDE software to program your Arduino.
Don’t forget to make the necessary modification in the MD_MAX72xx library file to reflect the type of module you are using.
Download the Parola Library created by MajicDesigns:
Download the MD_MAX72xx Library created by MajicDesigns: