#include <LedControl.h>
// Define the pins for the MAX7219 dot matrix module
int DIN = 10;
int CS = 9;
int CLK = 8;
// Define the letters (hexadecimal)
byte A[8] = {0x3c, 0x7e, 0x66, 0x66, 0x7e, 0x66, 0x66, 0x66};
byte U[8] = {0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7e, 0x3c};
byte G[8] = {0x7c, 0x7e, 0x06, 0x76, 0x76, 0x66, 0x7e, 0x3c};
byte S[8] = {0x7c, 0x7e, 0x06, 0x7e, 0x7c, 0x60, 0x7e, 0x3e};
byte T[8] = {0x7e, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18};
// Array of pointers to letters
byte* name[] = {A, U, G, U, S, T, A, S};
// Initialize LedControl with pin configuration
LedControl lc = LedControl(DIN, CLK, CS, 0);
void setup() {
lc.shutdown(0, false); // Disable shutdown mode for the MAX7219
}
void loop() {
// Display each letter with a 0.5s delay
for (int i = 0; i < sizeof(name) / sizeof(name[0]); i++) {
printByte(name[i]); // Print the current letter
delay(500);
}
// Clear the display and pause for 1s
lc.clearDisplay(0); // Clear the display on MAX7219
delay(1000);
}
void printByte(byte character []) {
// Display each row of the character on the MAX7219
int i = 0;
for (i = 0; i < 8; i++) {
lc.setRow(0, i, character[i]); // Set the LED matrix row for the current character
}
}