Skip to content

Lights

The point of this exercise is to light up the entire display using loops.

Info

Make sure to import the library into your platformio.ini:

lib_deps =
  MD_MAX72XX
Useful links and resources

Challenges

Challenge 1

Make the display turn on and off periodically.

Challenge 2

Try animating the screen that it fills slowly one pixel after pixel.

Challenge 3

Make it so that the animation flows like a snake, not only left-to-right or right-to-left.

Resources

Example

#include <MD_MAX72xx.h>

#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define CS_PIN 10
#define SEGMENTS 1

MD_MAX72XX display = MD_MAX72XX(HARDWARE_TYPE, CS_PIN, SEGMENTS);

void setup() {
    display.begin();
    display.clear();

    for (int row = 0; row < 8; row++) {
        for (int col = 0; col < 8; col++) {
            display.setPoint(col, row, 1);
        }
    }   
}

void loop() {
}