#include <LedControl.h>
// DIN, CLK, CS
LedControl lc = LedControl(11, 13, 10, 1); // 1 device
void setup() {
// put your setup code here, to run once:
lc.shutdown(0, false); // Wake up MAX7219
lc.setIntensity(0, 8); // Set brightness (0–15)
lc.clearDisplay(0); // Clear display
}
void loop() {
// put your main code here, to run repeatedly:
// Draw a diagonal line
for (int i = 0; i < 8; i++) {
lc.setLed(0, i, i, true); // (device, row, column, state)
delay(100);
}
delay(1000);
lc.clearDisplay(0);
}