#include <LedControl.h>
//ledControl(Din, CLK, CS, #matrices)
LedControl matriz=LedControl(2,4,3,1);
byte cero[8]= {
B00000000,
B00011000,
B00100100,
B00100100,
B00100100,
B00100100,
B00011000,
B00000000
};
byte uno[8]= {
B00010000,
B00011000,
B00010000,
B00010000,
B00010000,
B00010000,
B00010000,
B00111000
};
byte dos[8]= {
B00011000,
B00100100,
B00100000,
B00010000,
B00001000,
B00000100,
B00000100,
B00111100
};
byte letraA[8]= {
B00000000,
B00111100,
B00100100,
B00100100,
B00111100,
B00100100,
B00100100,
B00000000
};
void setup() {
matriz.shutdown(0,false); //#matriz, estado
matriz.setIntensity(0,15); //#matriz, intensidad
matriz.clearDisplay(0); //#matriz
}
void loop() {
mostrar(cero); delay(1000);
mostrar(uno); delay(1000);
}
void mostrar(byte caracter[]){
for(int fila=0; fila<8;fila++){
matriz.setRow(0,fila, caracter[fila]);
}
}