Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

MAX7219 LED matrix with Arduino Nano — scrolling text on an FC-16

Drive a 4-in-1 MAX7219 (FC-16) LED matrix from an Arduino Nano on hardware SPI (D10, D11, D13) and scroll a message with the MD_MAX72XX library.

Arduino C++Verified — core avr 1.8.8, MD_MAX72XX 3.5.1, 3 Nov 2026Compile-only

Community draft — report a mistake

A 32×8 LED matrix (four MAX7219 blocks on one FC-16 board) makes a bright scrolling sign for a shop counter or a token display. The Nano drives it with hardware SPI: DIN → D11, CLK → D13 and CS → D10.

The sketch uses MD_MAX72XX on its own (no Parola), shifting the display left one column at a time and feeding in the next column of the font.

Wiring

Arduino NanoOnly the pins used are shown · 5 V logicMAX7219 8×8 LED matrix (4-in-1 FC-16 module)D135VGNDD11D10VCCGNDDINCSCLK
Every connection
Arduino NanoMAX7219 8×8 LED matrix (4-in-1 FC-16 module)WireNotes
5VVCCredFine at low intensity from USB. Bright text on 8+ modules needs a separate 5 V supply.
GNDGNDblack
D11DINgreen
D10CSpurple
D13CLKyellow

5 V part, 5 V board. The MAX7219 runs on 5 V and expects a HIGH of at least 3.5 V. A 3.3 V board (ESP32, Pico) often works, but not reliably — for a dependable build, buffer DIN, CS and CLK with a 74HCT125 or 74AHCT125 powered from 5 V.

Board quirks

  • The Nano drives the MAX7219 at 5 V directly — no buffer needed, unlike a 3.3 V ESP32.
  • DIN must be D11 and CLK D13 for hardware SPI; CS can be any pin.
  • If letters appear mirrored or each block shows a rotated piece, the hardware type is wrong: try GENERIC_HW, ICSTATION_HW or PAROLA_HW instead of FC16_HW.
  • The input end of the chain is the side with the DIN pin. Chain more modules out of DOUT and raise DEVICES.
  • Each fully lit 8×8 block can draw over 300 mA at full intensity. Keep intensity low on USB.

Code

max7219-nano.inoArduino C++Open in PlaygroundOpen in PlaygroundFlash
// MAX7219 4-in-1 (FC-16) LED matrix on an Arduino Nano, scrolling a message with MD_MAX72XX.
// VCC → 5V, GND → GND, DIN → D11 (MOSI), CLK → D13 (SCK), CS → D10. Hardware SPI.
#include <SPI.h>
#include <MD_MAX72xx.h>

const uint8_t CS_PIN = 10;
const uint8_t DEVICES = 4;  // 8x8 blocks in the chain
MD_MAX72XX mx(MD_MAX72XX::FC16_HW, CS_PIN, DEVICES);

const char MESSAGE[] = "  FlashReady + Nano   ";

void scrollColumn(uint8_t col) {
  mx.transform(MD_MAX72XX::TSL);  // shift everything one column left
  mx.setColumn(0, col);           // new column enters on the right
  delay(35);
}

void setup() {
  Serial.begin(115200);
  mx.begin();
  mx.control(MD_MAX72XX::INTENSITY, 2);  // 0-15; low keeps USB current down
  mx.clear();
  Serial.println(F("Scrolling..."));
}

void loop() {
  uint8_t glyph[8];
  for (const char *p = MESSAGE; *p; p++) {
    uint8_t w = mx.getChar(*p, sizeof(glyph), glyph);
    for (uint8_t i = 0; i < w; i++) scrollColumn(glyph[i]);
    scrollColumn(0);  // one blank column between letters
  }
  Serial.println(F("Message done"));
}

Library: MD_MAX72XX (majicDesigns) — compiled with MD_MAX72XX 3.5.1.

Expected serial output

Serial Monitor · 115200Output
Scrolling...
Message done
Message done

Common errors

Text is mirrored, upside down or scrambled

Wrong moduleType. Change FC16_HW to the type that matches your board.

Nothing lights, or random dots

DIN and CLK swapped, or wired to the output end of the chain. Check against the module print.

↑↓ to move · Enter to open