Hello everyone,
I am working on a college project where I need to create a 32x126 dot matrix display using 4-in-1 MAX7219 dot matrix modules (16 modules in total). The goal is to display the current time on the display using an Arduino MEGA and an RTC module (e.g., DS3231 or DS1307).
But for now i have tried to make a double stack using 2 displays and UNO but the display is showing random lights
If anyone could share:
-
Connection diagrams.
-
Sample code or relevant resources.
-
Tips for troubleshooting such a setup. is huge help
Additional Info: -
I have a basic understanding of MAX7219 and Arduino programming.
-
This is a time-sensitive project, as it needs to be submitted soon.
here is the ino code:
include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
// Define hardware type and connections
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define MAX_DEVICES 8
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10
// Initialize the Parola object
MD_Parola P = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
// Include custom font files
#include "BigFontLower.h"
#include "BigFontUpper.h"
void setup() {
// Initialize Parola
P.begin(2); // 2 zones
// Set zone sizes
P.setZone(0, 0, MAX_DEVICES / 2 - 1); // Lower half
P.setZone(1, MAX_DEVICES / 2, MAX_DEVICES - 1); // Upper half
// Load custom fonts
P.setFont(0, BigFontLower);
P.setFont(1, BigFontUpper);
// Set text alignment
P.displayZoneText(0, "HELLO", PA_CENTER, 100, 0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
P.displayZoneText(1, "HELLO", PA_CENTER, 100, 0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
}
void loop() {
// Animate text
if (P.displayAnimate()) {
P.displayReset(0);
P.displayReset(1);
}
}
#ifndef BIGFONTUPPER_H
#define BIGFONTUPPER_H
#include <stdint.h>
MD_MAX72XX::fontType_t BigFontUpper[] PROGMEM = {
0x00, // 0 (ASCII - Non-printable)
0x00, // 1 (ASCII - Non-printable)
// Define the upper portion of 'A'
0b00000000, // Space between characters
0b00011100, // ###
0b00100010, // # #
0b00100010, // # #
0b00111110, // #####
0b00100010, // # #
0b00100010, // # #
0b00000000, // Space
// Define the upper portion of 'B'
0b00111100, // ####
0b00100010, // # #
0b00111100, // ####
0b00100010, // # #
0b00100010, // # #
0b00111100, // ####
0b00000000, // Space
// Add more characters as needed (repeat structure above)
};
#endif
#ifndef BIGFONTLOWER_H
#define BIGFONTLOWER_H
#include <stdint.h>
MD_MAX72XX::fontType_t BigFontLower[] PROGMEM = {
0x00, // 0 (ASCII - Non-printable)
0x00, // 1 (ASCII - Non-printable)
// Define the lower portion of 'A'
0b00100010, // # #
0b00100010, // # #
0b00100010, // # #
0b00100010, // # #
0b00100010, // # #
0b00100010, // # #
0b00000000, // Space
// Define the lower portion of 'B'
0b00100010, // # #
0b00100010, // # #
0b00100010, // # #
0b00100010, // # #
0b00100010, // # #
0b00111100, // ####
0b00000000, // Space
// Add more characters as needed (repeat structure above)
};
#endif