// Include necessary libraries
#include <MD_MAX72xx.h>
#include <MD_Parola.h>
#include <SPI.h>
// Define pin configuration
const byte clock_pin = 13;
const byte data_pin = 11;
const byte chip_select_pin = 10;
const byte max_devices = 4;
// Create an instance of the MD_Parola class
MD_Parola matrix = MD_Parola(MD_MAX72XX::PAROLA_HW, chip_select_pin, max_devices);
void setup() {
Serial.begin(9600);
// Initialize the module
matrix.begin();
// Clear the display if there is anything
matrix.displayClear();
}
void loop() {
// Set text alignment to center
matrix.setTextAlignment(PA_CENTER);
// Display the text "Hello"
matrix.print("Hello");
// Delay for 2000 milliseconds (2 seconds)
delay(2000);
// Set text alignment to left
matrix.setTextAlignment(PA_LEFT);
// Display the text "Daisy"
matrix.print("naman");
// Delay for 2000 milliseconds (2 seconds)
delay(2000);
}