#include <LedControl.h>
int DIN = 11, CS = 10, CLK = 13;
LedControl lc = LedControl(DIN, CLK, CS, 4);
byte line = B11111111;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
for(int i=0; i<4; i++){
lc.shutdown(i, false);
lc.setIntensity(i, 7);
lc.clearDisplay(i);
}
}
void loop() {
// put your main code here, to run repeatedly:
// for (int i = 0; i < 8; i++) {
// lc.setRow(0, i, line);
// delay(750);
// lc.setRow(0, i, ~line);
// delay(50);
// }
// for (int i = 6; i > 0; i--) {
// lc.setRow(0, i, line);
// delay(750);
// lc.setRow(0, i, ~line);
// delay(50);
// }
for(int i=0; i<8; i++){
for(int k=0; k<4; k++){
for(int j=0; j<8; j++){
lc.setLed(k,i,j, true);
Serial.print(k);
Serial.print(": ");
Serial.print(i);
Serial.print(",");
Serial.println(j);
delay(300);
lc.setLed(k,i,j, false);
delay(50);
}
}
}
}