#include <LedControl.h>
// PIN tanımları: DIN, CLK, CS
LedControl lc = LedControl(11, 13, 10, 1);
// H-E-L-L-O karakterlerinin sadeleştirilmiş 8x8 bitmap hali (örnek)
const byte letters[][8] = {
// H
{B10010000, B10010000, B10010000, B11110000, B10010000, B10010000, B10010000, B00000000},
// E
{B11110000, B10000000, B10000000, B11110000, B10000000, B10000000, B11110000, B00000000},
// L
{B10000000, B10000000, B10000000, B10000000, B10000000, B10000000, B11110000, B00000000},
// L
{B10000000, B10000000, B10000000, B10000000, B10000000, B10000000, B11110000, B00000000},
// O
{B01100000, B10010000, B10010000, B10010000, B10010000, B10010000, B01100000, B00000000}
};
const int letterCount = sizeof(letters) / 8;
int scrollPos = 0;
void setup() {
lc.shutdown(0, false);
lc.setIntensity(0, 8);
lc.clearDisplay(0);
}
void loop() {
for (int col = 0; col < 8; col++) {
for (int row = 0; row < 8; row++) {
byte val = getColumnData(scrollPos + col, row);
lc.setLed(0, row, 7 - col, val);
}
}
scrollPos++;
if (scrollPos >= letterCount * 8) scrollPos = 0;
delay(150);
}
bool getColumnData(int colIndex, int row) {
int charIndex = colIndex / 8;
int colInChar = colIndex % 8;
if (charIndex >= letterCount) return false;
return bitRead(letters[charIndex][row], 7 - colInChar); // soldan okuma
}