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 Nano | MAX7219 8×8 LED matrix (4-in-1 FC-16 module) | Wire | Notes |
|---|---|---|---|
| 5V | VCC | red | Fine at low intensity from USB. Bright text on 8+ modules needs a separate 5 V supply. |
| GND | GND | black | |
| D11 | DIN | green | |
| D10 | CS | purple | |
| D13 | CLK | yellow |
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_HWorPAROLA_HWinstead ofFC16_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 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"));
}// 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
Scrolling...
Message done
Message doneScrolling... 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.