#include <LedControl.h>
int ONE_SECOND = 1000;
int DIN=12;//Data input
int CLK=11;//Clock input
int CS=10;//Chip Select
int Matrix=1;
LedControl LED_M(DIN,CLK,CS,Matrix);
byte A[]={
B00000000,
B00011100,
B00100010,
B00100010,
B00111110,
B00100010,
B00100010,
B00100010};
byte B[]={
B00000000,
B00011110,
B00100010,
B00100010,
B00011110,
B00100010,
B00100010,
B00011110};
byte C[]={
B00000000,
B00011100,
B00100010,
B00000010,
B00000010,
B00000010,
B00100010,
B00011100};
byte D[]{
B00000000,
B00011110,
B00100010,
B00100010,
B00100010,
B00100010,
B00100010,
B00011110};
byte E[]={
B00000000,
B00111110,
B00000010,
B00000010,
B00111110,
B00000010,
B00000010,
B00111110};
void setup() {
// put your setup code here, to run once:
}
void loop() {
for(int i=0;i<=7;i++){
LED_M.setRow(0,i,A[i]);
}
delay(ONE_SECOND);
for(int i=0;i<=7;i++){
LED_M.setRow(0,i,B[i]);
}
delay(ONE_SECOND);
for(int i=0;i<=7;i++){
LED_M.setRow(0,i,C[i]);
}
delay(ONE_SECOND);
for(int i=0;i<=7;i++){
LED_M.setRow(0,i,D[i]);
}
delay(ONE_SECOND);
for(int i=0;i<=7;i++){
LED_M.setRow(0,i,E[i]);
}
delay(ONE_SECOND);
}