#include <LedControl.h>
//DIN, CLK, CS, kiek monitoriu
LedControl lcd (2, 4, 3, 4);
void setup() {
lcd.shutdown(0, false);
lcd.setIntensity(0, 10);
}
void loop() {
/*
for (int a = 0; a <=3; a +=1)
for (int b = 0; b <=7; b +=1)
{
lcd.clearDisplay(0);
lcd.clearDisplay(1);
lcd.clearDisplay(2);
lcd.clearDisplay(3);
lcd.setLed(a, 0, b, true);
delay(100);
}
for (int a = 0; a <=3; a +=1)
for (int c = 0; c <=7; c +=1)
{
lcd.clearDisplay(0);
lcd.clearDisplay(1);
lcd.clearDisplay(2);
lcd.clearDisplay(3);
lcd.setLed(a, c, 7, true);
delay(100);
}
for (int b = 7; b >=0; b -=1)
for (int a = 7; a >=0; a -=1)
{
lcd.clearDisplay(0);
lcd.clearDisplay(1);
lcd.clearDisplay(2);
lcd.clearDisplay(3);
lcd.setLed(a, 7, b, true);
delay(100);
}
for (int c = 7; c >=0; c -=1)
for (int b = 0; b <=7; b +=1)
{
lcd.clearDisplay(0);
lcd.clearDisplay(1);
lcd.clearDisplay(2);
lcd.clearDisplay(3);
lcd.setLed(a, c, b, true);
delay(100);
}
delay(100);
for (int a = 7; a >=0; a-=1)
*/
for (int a = 0; a <=3; a +=1)
{
lcd.setLed(a, 0, X, false);
}
X += 1;
for (int a = 0; a <=3; a +=1)
{
lcd.setLed(a, 0, X, true);
}
X += 1;
delay(100);
}