#include <LedControl.h>
#define CS_PIN 9
#define CLK_PIN 10
#define DIN_PIN 8
#define MAX_SEG 1
LedControl matrix = LedControl (DIN_PIN, CLK_PIN, CS_PIN, MAX_SEG); // MAX7219
void setup ()
{
matrix.shutdown(0, false);
matrix.setIntensity(0, 7);
matrix.clearDisplay(0);
}
byte row = 7;
byte column = 0;
void loop ()
{
int i=0;
for(row =0;row<=7;i++){
matrix.setLed (0, row, column, true); // on LED
delay (500);
matrix.setLed (0, row, column, false); // off LED
row=row+1;
delay (500);
}
}