#include <LedControl.h>
int DIN=11;
int CS =7;
int CLK=13;
LedControl lc=LedControl (DIN, CLK, CS, 0);
void setup() {
lc.shutdown (0, false);
lc.setIntensity (0,15);
lc.clearDisplay (0);
}
void loop() {
for (int i=0; i<8; i++) { // dolů z leva
for (int j=0; j<8; j++){
lc.setLed (0, i, j, true);
delay(30);
lc.clearDisplay (0);
}
}
for (int i=8; i>=0; i--) { //dolů z prava
for (int j=0; j<8; j++){
lc.setLed (0, i, j, true);
delay(30);
lc.clearDisplay (0);
}
}
for (int i=8; i>=0; i--) { // nahoru z prava
for (int j=8; j>=0; j--){
lc.setLed (0, i, j, true);
delay(30);
lc.clearDisplay (0);
}
}
for (int i=0; i<8; i++) { // nahoru z leva
for (int j=8; j>=0; j--){
lc.setLed (0, i, j, true);
delay(30);
lc.clearDisplay (0);
}
}
}
/*void dolupravo() {
for (int i=0; i<8; i++) {
for (int j=0; j<8; j++){
lc.setLed (0, i, j, true);
delay(50);
lc.clearDisplay (0);
}
}
}
void nahorulevo() {
for (int i=8; i>=0; i--) {
for (int j=8; j>=0; j--){
lc.setLed (0, j, i, true);
delay(50);
lc.clearDisplay (0);
}
}
}*/