Arduino UNO Q - LED Matrix

Want to display scrolling text or animated messages on a big LED matrix panel with your Arduino UNO Q? This tutorial shows you how — step by step.

In this tutorial, you will learn:

Arduino UNO Q LED Matrix

For the onboard 12×8 LED matrix built into the Arduino UNO Q itself, see the Arduino UNO Q - Built-in LED Matrix tutorial.

Hardware Preparation

1×Arduino UNO Q
1×USB Cable for Arduino Uno Q
1×FC-16 LED Matrix 32x8
1×FC-16 LED Matrix 8x8
1×Jumper Wires
1×5V Power Adapter
1×DC Power Jack
1×Recommended: Screw Terminal Block Shield for Arduino Uno
1×Recommended: Sensors/Servo Expansion Shield for Arduino Uno
1×Recommended: Breadboard Shield for Arduino Uno
1×Recommended: Enclosure for Arduino Uno
1×Recommended: Prototyping Base Plate & Breadboard Kit for Arduino UNO

Or you can buy the following kits:

1×DIYables Sensor Kit (18 sensors/displays)
Disclosure: Some of the links provided in this section are Amazon affiliate links. We may receive a commission for any purchases made through these links at no additional cost to you.
Additionally, some of these links are for products from our own brand, DIYables .

Overview of the LED Matrix

LED Matrix display

The most common LED matrix used with Arduino is the MAX7219-based LED matrix. Key facts:

  • Each block contains an 8×8 grid of 64 LEDs controlled by one MAX7219 chip
  • There are two main types of blocks: the generic module and the FC-16 module
  • Modules come in single-block (8×8) or multi-block (16×8, 32×8, 64×8) configurations
  • Blocks connect in a daisy chain — data passes from one block to the next
  • Control is done via SPI: CLK, MOSI (DIN), and one CS pin
  • The MD_Parola and MD_MAX72xx libraries handle all the heavy lifting

This tutorial uses a 4-block 32×8 FC-16 LED matrix (4 × 8×8 = 32 columns, 8 rows). The code can be adapted for any size.

Pinout

LED Matrix Pinout

Each block has two sets of pins — one input group (connects to Arduino UNO Q or previous block) and one output group (connects to next block):

  • VCC → 5V power supply (external — do not use the 5V pin on Arduino UNO Q for large displays)
  • GNDGND
  • DIN → SPI MOSI (D11 on Arduino UNO Q MCU)
  • CLK → SPI SCK (D13 on Arduino UNO Q MCU)
  • CS → any digital pin (D10 in this tutorial)

Wiring Diagram

※ NOTE THAT:

The LED matrix can draw up to 1 A at maximum brightness. Always use an external 5V power supply rather than the Arduino UNO Q's 5V pin. The Arduino UNO Q and the LED matrix can share the same 5V adapter and the same GND.

The Arduino UNO Q MCU connects to the LED matrix using SPI pins: D13 (SCK) and D11 (MOSI). You can use any digital pin for CS (D10 in this tutorial).

If the LED matrix consists of just one block:

  • Connect the group of input pins to the Arduino UNO Q MCU.
  • Leave the group of output pins unconnected.
The wiring diagram between Arduino UNO Q 8x8 LED matrix FC-16

This image is created using Fritzing. Click to enlarge image

The wiring diagram between Arduino UNO Q 8x8 LED matrix generic

This image is created using Fritzing. Click to enlarge image

If the LED matrix comes already assembled into multiple blocks:

  • Connect the group of input pins to the Arduino UNO Q MCU.
  • Leave the group of output pins unconnected.
The wiring diagram between Arduino UNO Q LED matrix

This image is created using Fritzing. Click to enlarge image

If you assemble the LED matrix from several individual blocks:

  • Connect the input pin group of the first block to the Arduino UNO Q MCU.
  • Connect the output pin group of each block to the input pin group of the next block.
  • Leave the output pin group of the last block unconnected.
The wiring diagram between Arduino UNO Q 32x8 LED matrix FC-16

This image is created using Fritzing. Click to enlarge image

The wiring diagram between Arduino UNO Q 32x8 LED matrix generic

This image is created using Fritzing. Click to enlarge image

LED Matrix Arduino UNO Q MCU
VCC External 5V power supply
GND GND (shared with Arduino UNO Q GND)
DIN D11 (MOSI)
CLK D13 (SCK)
CS D10

Arduino UNO Q Code

The Arduino UNO Q has two processors working together:

  • The STM32 MCU drives the LED matrix directly via SPI using the MD_Parola library
  • The Qualcomm MPU runs Debian Linux and handles Wi-Fi, Python, and cloud connectivity
  • In this section, only the MCU is programmed — the Linux side stays idle. A later section shows how both processors work together via Bridge.

The sketch below demonstrates static text (left/center/right/inverted), a number display, and a scrolling message:

/* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-led-matrix */ // COPYRIGHT newbiely.com // AUTHOR: newbiely // This code is made available for public use without restriction. // For complete instructions, tutorials, and further information, visit: // https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-led-matrix #include <MD_Parola.h> #include <MD_MAX72xx.h> #define HARDWARE_TYPE MD_MAX72XX::FC16_HW #define MAX_DEVICES 4 // 4 blocks (32x8 LED matrix) #define CS_PIN 10 // Arduino UNO Q MCU pin connected to CS MD_Parola ledMatrix = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES); void setup() { Serial.begin(115200); delay(1500); ledMatrix.begin(); ledMatrix.setIntensity(8); // brightness: 0 (dim) to 15 (bright) ledMatrix.displayClear(); Serial.println("Arduino UNO Q LED Matrix ready"); } void loop() { // Static text — left aligned ledMatrix.setTextAlignment(PA_LEFT); ledMatrix.print("Left"); delay(2000); // Static text — center aligned ledMatrix.setTextAlignment(PA_CENTER); ledMatrix.print("Center"); delay(2000); // Static text — right aligned ledMatrix.setTextAlignment(PA_RIGHT); ledMatrix.print("Right"); delay(2000); // Inverted display ledMatrix.setTextAlignment(PA_CENTER); ledMatrix.setInvert(true); ledMatrix.print("Invert"); delay(2000); ledMatrix.setInvert(false); // Display a number ledMatrix.print(1234); delay(2000); // Scrolling text ledMatrix.displayClear(); ledMatrix.displayScroll("Hello, DIYables!", PA_CENTER, PA_SCROLL_LEFT, 80); while (!ledMatrix.displayAnimate()) {} // wait until scroll finishes delay(1000); }

Detailed Instructions

First time with Arduino UNO Q? Follow the Getting Started with Arduino UNO Q tutorial to get your development environment ready before proceeding.

  • Connect: Wire the LED matrix to the Arduino UNO Q MCU as shown in the wiring diagram above. Power the matrix from an external 5V adapter and connect GND to the Arduino UNO Q GND.
  • Open Arduino App Lab: Launch Arduino App Lab and wait until it detects your Arduino UNO Q.
  • Create a new App: Click the Create New App button.
Create New App in Arduino App Lab on Arduino UNO Q
  • Give the App a name, for example: LedMatrix
  • Click Create to confirm.
Arduino App Lab App folders and files on Arduino UNO Q
  • Find the sketch/sketch.ino file — this is where you will paste the MCU sketch.
  • Paste the sketch: Copy the MCU code above and paste it into that sketch file. Keep other files as default.
    • Install the library: Click the Add sketch library button (the open book icon with a + sign) in the left sidebar.
    Add sketch library in Arduino App Lab on Arduino UNO Q
    • Search for Arduino_RouterBridge created by Arduino and click the Install button.
    My Apps / DIYables Apps
    Run
    Bricks
    No bricks added...
    Sketch Libraries
    No sketch libra...
    Files
    python
    sketch
    .gitignore
    README.md
    app.yaml
    sketch.ino
    Add sketch library
    Arduino_RouterBridge Arduino

    This library provides a simple RPC bridge for Arduino UNO Q boards, allowing communication between the board and other devices using MsgPack serialization.

    0.4.1
    Install
    More Info
    • Search for MD_Parola created by majicDesigns and click the Install button.
    My Apps / DIYables Apps
    Run
    Bricks
    No bricks added...
    Sketch Libraries
    No sketch libra...
    Files
    python
    sketch
    .gitignore
    README.md
    app.yaml
    sketch.ino
    Add sketch library
    MD_Parola majicDesigns

    Implemented using the MD_MAX72xx library for hardware control. Provides functions to simplify the implementation of text special effects on the LED matrix.

    3.7.2
    Install
    More Info
    • Search for MD_MAX72XX created by majicDesigns and click the Install button.
    My Apps / DIYables Apps
    Run
    Bricks
    No bricks added...
    Sketch Libraries
    No sketch libra...
    Files
    python
    sketch
    .gitignore
    README.md
    app.yaml
    sketch.ino
    Add sketch library
    MD_MAX72XX majicDesigns

    Allows the programmer to use the LED matrix as a pixel addressable display.

    3.5.1
    Install
    More Info
    • Upload: Click the Run button in Arduino App Lab to compile and upload to the STM32.
    Click Run button in Arduino App Lab on Arduino UNO Q

    The LED matrix cycles through text alignments, displays a number, and then scrolls "Hello, DIYables!" across the display!

    Arduino UNO Q LED Matrix Code – Scrolling Text

    When you need to show a long message on a LED matrix display that is too long to fit, you can use the scrolling text effect.

    This code demonstrates how to make a message scroll continuously across the LED matrix display.

    /* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-led-matrix */ // COPYRIGHT newbiely.com // AUTHOR: newbiely // This code is made available for public use without restriction. // For complete instructions, tutorials, and further information, visit: // https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-led-matrix #include <MD_Parola.h> #include <MD_MAX72xx.h> #define HARDWARE_TYPE MD_MAX72XX::FC16_HW #define MAX_DEVICES 4 // 4 blocks (32x8 LED matrix) #define CS_PIN 10 // Arduino UNO Q MCU pin connected to CS MD_Parola ledMatrix = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES); void setup() { ledMatrix.begin(); ledMatrix.setIntensity(8); // brightness: 0 (dim) to 15 (bright) ledMatrix.displayClear(); ledMatrix.displayScroll("Hello, DIYables!", PA_CENTER, PA_SCROLL_LEFT, 80); } void loop() { if (ledMatrix.displayAnimate()) { ledMatrix.displayReset(); } }

    To see more text effects, go to MD_Parola Library Reference.

    Bridge: Linux + MCU

    This section shows how to program both processors of the Arduino UNO Q so the Linux side can control the LED matrix remotely:

    • The LED matrix is connected to the MCU (STM32) via SPI — the MCU drives the display directly
    • The MPU cannot access the LED matrix directly — it must send commands to the MCU via Bridge.call()
    • The MPU has Wi-Fi — running full Debian Linux, it can connect to the Internet and trigger display updates remotely
    • Arduino_RouterBridge enables RPC communication between the two processors
    • ⚠️ /dev/ttyHS1 (Linux) and Serial1 (MCU) are RESERVED by the router — never open them in user code

    In short: MCU drives the LED matrix → MPU sends text commands → MPU can update the display from anywhere over the Internet.

    MCU Code (Bridge)

    /* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-led-matrix */ // COPYRIGHT newbiely.com // AUTHOR: newbiely // This code is made available for public use without restriction. // For complete instructions, tutorials, and further information, visit: // https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-led-matrix #include <MD_Parola.h> #include <MD_MAX72xx.h> #include "Arduino_RouterBridge.h" #define HARDWARE_TYPE MD_MAX72XX::FC16_HW #define MAX_DEVICES 4 // 4 blocks (32x8 LED matrix) #define CS_PIN 10 // Arduino UNO Q MCU pin connected to CS MD_Parola ledMatrix = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES); String last_text = ""; String display_text(String arg) { ledMatrix.setTextAlignment(PA_CENTER); ledMatrix.setInvert(false); ledMatrix.print(arg.c_str()); last_text = arg; Monitor.println("Display: " + arg); return "OK"; } String set_brightness(String arg) { int level = arg.toInt(); if (level < 0) level = 0; if (level > 15) level = 15; ledMatrix.setIntensity(level); Monitor.println("Brightness: " + String(level)); return "OK"; } String clear_display(String arg) { ledMatrix.displayClear(); last_text = ""; Monitor.println("Display cleared"); return "OK"; } String get_status(String arg) { if (last_text.length() == 0) return "Display: cleared"; return "Display shows: " + last_text; } void setup() { Bridge.begin(); Monitor.begin(); ledMatrix.begin(); ledMatrix.setIntensity(8); ledMatrix.displayClear(); Bridge.provide_safe("display_text", display_text); Bridge.provide_safe("set_brightness", set_brightness); Bridge.provide_safe("clear_display", clear_display); Bridge.provide("get_status", get_status); Monitor.println("Arduino UNO Q LED Matrix Bridge ready"); } void loop() {}

    Python Code (Bridge)

    """ This Arduino UNO Q script was developed by newbiely.com This Arduino UNO Q script is made available for public use without any restriction For comprehensive instructions and wiring diagrams, please visit: https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-led-matrix """ # COPYRIGHT newbiely.com # AUTHOR: newbiely # This code is made available for public use without restriction. # For complete instructions, tutorials, and further information, visit: # https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-led-matrix from arduino.app_utils import * import time def loop(): # Display text result = Bridge.call("display_text", "Hello") print(result) time.sleep(2) result = Bridge.call("display_text", "1234") print(result) time.sleep(2) # Set brightness to dim result = Bridge.call("set_brightness", "3") print(result) time.sleep(1) result = Bridge.call("display_text", "Dim") print(result) time.sleep(2) # Set brightness back to medium result = Bridge.call("set_brightness", "8") print(result) time.sleep(1) # Get status result = Bridge.call("get_status") print(result) time.sleep(1) # Clear display result = Bridge.call("clear_display") print(result) time.sleep(2) App.run(user_loop=loop)

    Detailed Instructions

    • Connect: Wire the LED matrix to the Arduino UNO Q as shown in the wiring diagram, with external 5V power.
    • Open Arduino App Lab: Launch Arduino App Lab and wait for the board to be detected.
    • Create a new App: Click Create New App, name it LedMatrixBridge, then click Create.
    • Paste the MCU sketch: Copy the MCU Bridge code above and paste it into sketch/sketch.ino.
    • Paste the Python code: Copy the Python Bridge code above and paste it into the Python file in the App.
    • Upload: Click the Run button in Arduino App Lab.
    Click Run button in Arduino App Lab on Arduino UNO Q

    App Lab Console Output

    DIYables_Apps
    Stop
    sketch.ino
    1#include "Arduino_RouterBridge.h"
    Serial Monitor
    Python
    Message (Enter to send a message to "Newbiely" on usb(2820070321))
    New Line
    9600 baud
    [2026-04-29 09:00:01] Arduino UNO Q LED Matrix Bridge ready [2026-04-29 09:00:03] Display: Hello [2026-04-29 09:00:07] Display: 1234 [2026-04-29 09:00:11] Brightness: 3 [2026-04-29 09:00:15] Display cleared
    DIYables_Apps
    Stop
    sketch.ino
    1#include "Arduino_RouterBridge.h"
    Serial Monitor
    Python
    [2026-04-29 09:00:02] OK [2026-04-29 09:00:06] OK [2026-04-29 09:00:10] OK [2026-04-29 09:00:12] Display shows: Dim [2026-04-29 09:00:14] OK

    Telegram

    Control the LED matrix from anywhere using Telegram — display custom messages or numbers on the panel from your phone!

    MCU sketch: Keep the same MCU sketch from the previous Bridge section.

    Python Code (Telegram)

    """ This Arduino UNO Q script was developed by newbiely.com This Arduino UNO Q script is made available for public use without any restriction For comprehensive instructions and wiring diagrams, please visit: https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-led-matrix """ # COPYRIGHT newbiely.com # AUTHOR: newbiely # This code is made available for public use without restriction. # For complete instructions, tutorials, and further information, visit: # https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-led-matrix from arduino.app_utils import * import requests import time TELEGRAM_BOT_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN" CHAT_ID = "YOUR_CHAT_ID" last_update_id = 0 def get_updates(): global last_update_id url = f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/getUpdates" params = {"offset": last_update_id + 1, "timeout": 5} try: response = requests.get(url, params=params, timeout=10) data = response.json() if data["ok"]: return data["result"] except Exception as e: print(f"Error getting updates: {e}") return [] def send_message(chat_id, text): url = f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage" payload = {"chat_id": chat_id, "text": text} try: requests.post(url, data=payload, timeout=10) except Exception as e: print(f"Error sending message: {e}") def loop(): global last_update_id print("Waiting for Telegram messages...") updates = get_updates() for update in updates: last_update_id = update["update_id"] if "message" not in update: continue message = update["message"] chat_id = message["chat"]["id"] text = message.get("text", "").strip() print(f"Received: {text}") if text == "/start": send_message(chat_id, "Arduino UNO Q LED Matrix Bot\n" "/show <text> - Display text on the matrix\n" "/brightness <0-15> - Set brightness level\n" "/clear - Clear the matrix\n" "/status - Get current display status") elif text.startswith("/show "): arg = text[6:].strip() if not arg: send_message(chat_id, "Usage: /show <text>") else: result = Bridge.call("display_text", arg) send_message(chat_id, result) elif text.startswith("/brightness "): arg = text[12:].strip() result = Bridge.call("set_brightness", arg) send_message(chat_id, result) elif text == "/clear": result = Bridge.call("clear_display") send_message(chat_id, result) elif text == "/status": result = Bridge.call("get_status") send_message(chat_id, result) else: send_message(chat_id, "Unknown command. Send /start for help.") App.run(user_loop=loop)

    Detailed Instructions

    • Replace YOUR_TELEGRAM_BOT_TOKEN with your actual bot token from BotFather.
    • Replace YOUR_CHAT_ID with your Telegram chat ID.
    • Paste this Python code into your App's Python file (keep the same MCU sketch).
    • Click the Run button. Open Telegram and send commands to your bot.

    App Lab Console Output

    DIYables_Apps
    Stop
    sketch.ino
    1#include "Arduino_RouterBridge.h"
    Serial Monitor
    Python
    [2026-04-29 09:15:00] Waiting for Telegram messages... [2026-04-29 09:15:08] Received: /show Hello World [2026-04-29 09:15:20] Received: /brightness 5 [2026-04-29 09:15:35] Received: /clear
    Telegram
    Telegram 12:45
    Welcome to Telegram!
    ArduinoBot 10:19
    Chatting with Arduino...
    telegram-botfather
    BotFather Yesterday
    Your bot has been created.

    ArduinoBot

    bot
    Today
    /show Hello World
    10:15 AM ✓✓
    OK
    10:16 AM
    /brightness 5
    10:17 AM ✓✓
    OK
    10:18 AM
    /status
    10:19 AM ✓✓
    Display shows: Hello World
    10:20 AM
    /clear
    10:21 AM ✓✓
    OK
    10:22 AM

    OpenClaw

    ...OPENCLAW

    OpenClaw support for Arduino UNO Q LED Matrix is coming soon.

    ...OPENCLAW

    Project Ideas

    You can build many creative projects using the LED matrix with Arduino UNO Q:

    • Remote Notice Board: Send custom messages to the LED matrix panel via Telegram — ideal for office displays, shop signs, or event announcements
    • Live Score Display: Display sports scores or game results on the matrix, updated in real time from the Linux side via Bridge
    • Countdown Timer: Python counts down and updates the matrix display every second until zero
    • IoT Weather Display: Fetch weather data on the Linux MPU and scroll the temperature and conditions across the LED matrix automatically
    • Telegram Billboard: Allow anyone in a group chat to send a message that gets displayed on the matrix panel via a shared Telegram bot

    Challenge Yourself

    Ready to go further with the LED matrix on Arduino UNO Q? Try these challenges:

    • Easy: Add a /number <value> Telegram command that displays an integer on the LED matrix using ledMatrix.print(int).
    • Medium: Add a /scroll <text> Bridge function that starts a scrolling animation — use a background flag in the MCU loop() to call displayAnimate() and displayReset() while scrolling is active.
    • Advanced: Build a Telegram-controlled news ticker — accept multiple messages via Telegram and queue them, displaying each in sequence on the matrix as a scrolling marquee.

    Video Tutorial

    ※ OUR MESSAGES

    • As freelancers, We are AVAILABLE for HIRE. See how to outsource your project to us
    • Please feel free to share the link of this tutorial. However, Please do not use our content on any other websites. We invested a lot of effort and time to create the content, please respect our work!