#include <LedControl.h>

#define DIN 12
#define CLK 11
#define CS  10
#define COUNT 1

LedControl lc = LedControl(DIN, CLK, CS, COUNT);

char pukimai[7][8] = {
  {B00000000, B00011110, B00100010, B00100010, B00011110, B00001010, B00010010, B00100010},
  {B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000},
  {B00000000, B01100110, B11111111, B11111111, B01111110, B00111100, B00011000, B00000000},
  {B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000},
  {B00000000, B01100110, B11111111, B11111111, B01111110, B00111100, B00011000, B00000000},
  {B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000},
};

void setup() {
  lc.shutdown(0, false); // Menyalakan MAX7219
  lc.setIntensity(0, 8); // Set tingkat kecerahan
  lc.clearDisplay(0); // Membersihkan tampilan
}

void loop() {
  displayText(pukimai, 5);
  delay(000); // Tampilkan teks selama 2 detik
}

void displayText(char characters[][8], int length) {
  for (int i = 0; i < length; i++) {
    for (int j = 0; j < 8; j++) {
      lc.setRow(0, j, characters[i][j]);
    }
    delay(500); // Tampilkan setiap karakter selama 0.5 detik
  }
  lc.clearDisplay(0);
}