#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
// Define the number of devices we have in the chain and the hardware interface
#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW
#define MAX_DEVICES 1
#define CLK_PIN 18
#define DATA_PIN 33
#define CS_PIN 5
// Hardware SPI connection
MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
const char* fullName = "Volodymyr"; // The message to display
int currentChar = 0; // Index of the current character
void setup(void)
{
P.begin();
P.displayText("", PA_CENTER, 100, 1000, PA_PRINT, PA_NO_EFFECT); // Initialize display
}
void loop(void)
{
if (P.displayAnimate()) // Check if the display animation has completed
{
// Display the current character
char currentText[2] = {fullName[currentChar], '\0'}; // Create a string for the current character
P.displayText(currentText, PA_CENTER, 100, 1000, PA_PRINT, PA_NO_EFFECT);
// Move to the next character or loop back to the start
currentChar = (currentChar + 1) % strlen(fullName);
}
}