#include "LedControl.h"
LedControl lc=LedControl(12,10,11,1);
byte a[8] = {B01100110,B01100110,B01111110,B01100110,B01100110,B00111100,B00011000,B00000000,};
byte b[8] = {B11111100,B01100110,B01100110,B01111100,B01100110,B01100110,B11111100,B00000000,};
byte heart[8]={0b00000000,0b01100110,0b10011011,0b10000001,0b10000001,0b01000010,0b00100100,0b00011000};
void setup() {
lc.shutdown(0, false); //posizioni della matrice a 0
lc.setIntensity(0, 0); //si regola l'intensità dei led della matrice
lc.clearDisplay(0); //la matrice parte con tutti i led spenti
}
void loop() {
for (int row = 0; row < 8; row++) {
lc.setRow(0, row, a[row]); //l'indice si chiama row, quindi faccio a di row
}
delay(2000);
for (int row = 0; row < 8; row++) {
lc.setRow (0, row, heart[row]);
}
delay(2000);
}/*
byte heart[8] = {
0b00000000,
0b01100110,
0b10011011,
0b10000001,
0b10000001,
0b01000010,
0b00100100,
0b00011000
};
byte sed[8]={
0b00111100,
0b01000010,
0b10100101,
0b10000001,
0b10011001,
0b10100101,
0b01000010,
0b00111100
};
byte happy[8]={
0b00111100,
0b01000010,
0b10100101,
0b10000001,
0b10100101,
0b10011001,
0b01000010,
0b00111100
};
byte meh[8]={
0b00111100,
0b01000010,
0b10100101,
0b10000001,
0b10111101,
0b10000001,
0b01000010,
0b00111100
};
byte sed[8]={
0b00111100,
0b01000010,
0b10100101,
0b10000001,
0b10011001,
0b10100101,
0b01000010,
0b00111100
};
*/