#include "LedControl.h"
/*
pin 4 is connected to the DataIn
pin 2 is connected to the CLK
pin 3 is connected to LOAD
We have only a single MAX72XX.
*/
LedControl lc=LedControl(4,2,3,1);
unsigned long delaytime=300;
void setup() {
lc.shutdown(0,false);
lc.setIntensity(0,8);
lc.clearDisplay(0);
}
void Sti2DOnMatrix() {
byte S[5]={B00000000,B01000110,B01001001,B01001001,B00110001};
byte t[5]={B00000000,B00000100,B00111111,B01000100,B01000100};
byte i[5]={B00000000,B00000000,B01001000,B01111010,B01000000};
byte II[5]={B01100010,B01010001,B01001001,B01001001,B01000110};
byte d[5]={B00111000,B01000100,B01000100,B01001000,B01111111};
lc.setRow(0,3,S[0]);
lc.setRow(0,4,S[1]);
lc.setRow(0,5,S[2]);
lc.setRow(0,6,S[3]);
lc.setRow(0,7,S[4]);
delay(delaytime);
lc.setRow(0,3,t[0]);
lc.setRow(0,4,t[1]);
lc.setRow(0,5,t[2]);
lc.setRow(0,6,t[3]);
lc.setRow(0,7,t[4]);
delay(delaytime);
lc.setRow(0,3,i[0]);
lc.setRow(0,4,i[1]);
lc.setRow(0,5,i[2]);
lc.setRow(0,6,i[3]);
lc.setRow(0,7,i[4]);
delay(delaytime);
lc.setRow(0,3,II[0]);
lc.setRow(0,4,II[1]);
lc.setRow(0,5,II[2]);
lc.setRow(0,6,II[3]);
lc.setRow(0,7,II[4]);
delay(delaytime);
lc.setRow(0,3,d[0]);
lc.setRow(0,4,d[1]);
lc.setRow(0,5,d[2]);
lc.setRow(0,6,d[3]);
lc.setRow(0,7,d[4]);
delay(delaytime);
lc.clearDisplay(0);
delay(delaytime*5);
}
void loop() {
Sti2DOnMatrix();
}