#include <LedControl.h>
int DIN = 11;
int CS = 10;
int CLK = 13;
int isShown = false;
LedControl lc = LedControl(DIN, CLK, CS, 1);
void setup() {
lc.shutdown(0, false);
lc.setIntensity(0, 8);
lc.clearDisplay(0);
}
byte letters[9][8] = {
{0b00000000,
0b00111110,
0b01100110,
0b01100110,
0b01111110,
0b01100110,
0b01100110,
0b00000000},
{0b00000000,
0b01111100,
0b00110010,
0b01111100,
0b00110010,
0b00110010,
0b01111100,
0b00000000},
{0b00000000,
0b00111110,
0b01100110,
0b01100000,
0b01100000,
0b01100110,
0b00111110,
0b00000000},
{0b00000000,
0b01111100,
0b00110010,
0b00110010,
0b00110010,
0b00110010,
0b01111100,
0b00000000},
{0b00000000,
0b01111110,
0b01100000,
0b01111100,
0b01100000,
0b01100000,
0b01111110,
0b00000000},
{0b00000000,
0b01111110,
0b01100000,
0b01111100,
0b01100000,
0b01100000,
0b01100000,
0b00000000},
{0b00000000,
0b00111110,
0b01100110,
0b01100000,
0b01101110,
0b01100110,
0b00111110,
0b00000000},
{0b00000000,
0b01100110,
0b01100110,
0b01100110,
0b01111110,
0b01100110,
0b01100110,
0b00000000},
{0b00000000,
0b00111110,
0b00011000,
0b00011000,
0b00011000,
0b00011000,
0b00111110,
0b00000000}
};
void displayLetter(int letterIndex) {
for (int row = 0; row < 8; row++) {
byte rowData = letters[letterIndex][row];
for (int col = 0; col < 8; col++) {
boolean isLedOn = bitRead(rowData, col);
lc.setLed(0, row, col, isLedOn);
}
}
}
void loop() {
if (isShown) return;
for (int i = 0; i < 9; i++) {
lc.clearDisplay(0);
delay(50);
displayLetter(i);
delay(1000);
}
isShown = true;
}