/* UD5.LAB9A - Matrix Ball */
#include <LedControl.h> //Libreria per la gestione del diplay a matrice
//LED
/* PIN DI CONNESSIONE */
#define PIN_DIN 11
#define PIN_CS 4
#define PIN_CLK 13
#define NUM_DISPLAY 1
/* Istanza del LED CONTROL */
LedControl LC = LedControl(PIN_DIN, PIN_CLK, PIN_CS, NUM_DISPLAY);
void setup() {
LC.shutdown(0, false); //Spengo tutti i led
}
void loop() {
for(int x=0; x<8; x++) {
for(int y=0; y<8; y++) {
LC.setLed(0, x, y, true);
delay(100);
LC.setLed(0, x, y, false);
}
}
}