Animation Tutorial on 4 in 1 MAX7219 LED Display

Today in this video we will discuss how to make variety of animations using MAX7219 LED Display. This LED Display consists of Four 8*8 LED Matrix Display.

four led matrix

At first the HexaDecimal files comes to the Microcontroller then it comes to the Peripheral Part means to the LED Display.

Hexfiles

Here I used D1 Mini as Microcontroller, anyone can used ESP8266 instead of D1 Mini and MAX7219 LED Display (Please check components link in the below).

Please support us on YouTube also. Like Share and Subscribe to our channel : https://youtube.com/c/RatnasRoboLab

Components

(1) MAX7219 Dot Matrix MCU LED Display Control Module Kit : https://amzn.to/3V5eboN
(2) Wemos® D1 Mini NodeMcu Lua WIFI ESP8266 Development Board: https://amzn.to/41IWgXw
(3) Programming USB Cable: https://amzn.to/3Nj01yj
(4) MAX7219 Display 4 in 1 : https://amzn.to/3n3DI4Y

Circuit Diagram

D1 mini’s (Microcontroller) Ground Pin and 5V connected to MAX7219 LED Display Ground Pin and VCC. MAX7219 LED Display’s DIN, CS and CLK pin is connected to Microcontroller’s pin D7, D4 and D5 respectively.

circuit diagram max7219
Controller D1 Mini and MAX7219 LED Display

Step By Step

Ok let it be simple, first glow the first LED in the first row in the first 8*8 LED Matrix.

1 led 1 row
#include <MD_MAX72xx.h>
#include <SPI.h>

#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define MAX_DEVICES 4
#define CLK_PIN   14   // or SCK  D5
#define DATA_PIN  13  // or MOSI D7
#define CS_PIN    2  // or SS   D4

MD_MAX72XX mx = MD_MAX72XX(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);   // SPI hardware interface
unsigned char firstledfirstrow[8]={0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

int i=0;     // you can change the value of i from 0 to 3

void setup() 
{
  // put your setup code here, to run once:
     mx.begin();
}

void loop() 
{
         for (int j=0; j<8; j++)
         {
          mx.setRow(i, j, firstledfirstrow[j]);   // For setting a led in 1strow
         }
}

In this way we can easily create many type of animations on 8*8 LED Matrix by sending HexaDecimal files to the Microcontroller.

love animation edited

In this way we can also make a Digital Clock by setting the Time that after every minute 1st and 2nd 8*8 LED Matrix changes and every 60 minute Hour segment means 3rd an 4th 8*8 LED Matrix changes.

Code

Click the link and download the Code. Here is the link : https://drive.google.com/file/d/1BK1-4wmpl2hnKZEsJnzwiEV0FZZjG_1t/view?usp=drive_link

Code to Note

mx.setRow(i, j, 0x00) – In this function the parameter i is used for which LED Matrix we want to display. If we set i=0; then 1st LED Matrix will glow, if we set i=3; then 4th LED Matrix will glow. The parameter j is used for which row we want to display. If we set j=0; then in 1st row will glow, if we set j=7; then in 8th row will glow.

Result

By this program we can control any LED that we want to glow in the big 32*8 LED Display by sending array of Hexa Decimals. Similarly, we can also reprogram the ARDUINO and change the Hexa Decimals and make any kind of animations.

Further Readings

If you liked this article, then please subscribe to our YouTube Channel. You can also find us on InstagramFacebook and Twitter.

READ – CONNECT – BOOST – CREATE