#include <LedControl.h>
LedControl lc = LedControl(3,5,4,1);
byte on = B11111111;
byte off = B00000000;
byte onfirst = B10000000;
void display_x(){
for(int i = 0; i < 8; i++){
lc.setLed(0, currentRow(i), i, true);
lc.setLed(0, currentRow(i), 7-i, true);
}
}
void display_svat(){
lc.setRow(0, currentRow(3), on);
lc.setRow(0, currentRow(4), on);
lc.setColumn(0, 4, on);
lc.setColumn(0, 3, on);
}
void setup() {
// put your setup code here, to run once:
//lc.shutdown(0, false);
//lc.setIntensity(0, 0.8);
//lc.clearDisplay(0);
//display_svat();
}
int currentRow(int row){
return 7-row;
}
void loop() {
// put your main code here, to run repeatedly:
/*for(int i=0; i < 8; i++){
lc.setRow(0,currentRow(i),on);
delay(500);
lc.setRow(0,currentRow(i),off);
}
for(int i = 0; i < 8; i++){
lc.setLed(0, currentRow(i), i, true);
delay(1000);
lc.setLed(0, currentRow(i), i, false);
}*/
display_x();
delay(1000);
lc.clearDisplay(0);
delay(1000);
}