Introduction
If you have ever wanted to create a dynamic LED message display using a P10 LED Module and an Arduino Uno, you have come to the right place. Picture this: A small, portable display showing scrolling messages that catch everyone’s attention, perfect for events, your home setup, or even a simple advertising board for your shop.
This guide will take you step by step through a simple yet effective Arduino project that lets you show custom scrolling text on a Dot Matrix Display (DMD). You don’t need to be a tech expert or have tons of experience with electronics. If you know the basics of how to connect wires and upload a code to your Arduino, you can build it.
We’ll cover everything you need to know, from setting up the hardware to uploading the Arduino code, explaining every part along the way. So, whether you’re just getting started with your first Arduino Uno project or looking to expand your skills in LED displays, this guide will get you up and running quickly.
At the end of this tutorial, you’ll have your LED message display, ready to showcase any text you want—from greetings and quotes to notifications and ads.
Why Choose a P10 LED Module and Arduino?
So why use a P10 LED Module with an Arduino Uno? Here are a few reasons:
- Affordable and Easy to Get: These modules are budget-friendly and widely available, making them a go-to choice for DIY projects.
- User-Friendly Control: An Arduino Uno simplifies the process. You can easily program and customise your display with just a few lines of code.
- Great for Beginners: If you’re just starting, this is a solid project to learn basic electronics and programming. Plus, the results are visually rewarding!
- Scalable: If you want a larger display, you can connect multiple P10 modules for an extended screen.
What You Need:
- Arduino Uno board
- P10 LED Module (DMD)
- 5V power supply (minimum 2A)
- Jumper wires
Required Libraries:
Before you write the code, make sure you have these libraries installed:
- SPI.h – Handles communication between the Arduino and the LED module.
- DMD.h – Manages the Dot Matrix Display functions.
- TimerOne.h – Allows precise timing functions using interrupts.
- SystemFont5x7.h and Arial_black_16.h – Provide fonts for text display.
Installation:
Go to Sketch > Include Library > Manage Libraries in the Arduino IDE. Search for DMD, TimerOne, and install them.
Wiring Setup:
Here’s how to connect the Arduino Uno to the P10 LED Module:
| Arduino Pin | P10 LED Module Pin |
| 9 | nOE (Output Enable) |
| 6 | A |
| 7 | B |
| 13 (SCK) | CLK (Clock) |
| 8 | SCLK (Shift Clock) |
| 11 (MOSI) | R_DATA (Data In) |

The Complete Code:
#include <SPI.h>Â Â Â Â // Include these libraries to avoid compiling errors
#include <DMD.h>
#include <TimerOne.h>
#include "SystemFont5x7.h"
#include "Arial_black_16.h"
#define DISPLAYS_ACROSS 1Â // Number of DMD modules across (horizontal)
#define DISPLAYS_DOWN 1Â Â // Number of DMD modules down (vertical)
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
#define max_char 1000 // Maximum number of characters for the message
char message[] = "Welcome to Nicrobit"; // Message to display
void ScanDMD() {
  dmd.scanDisplayBySPI(); // Scan and update the display
}
void setup() {
  Serial.begin(9600); // Start serial communication
  Timer1.initialize(5000); // Initialize Timer1 with a 5ms interval
  Timer1.attachInterrupt(ScanDMD); // Attach the scan function to the timer interrupt
  dmd.clearScreen(true); // Clear the display RAM
  Serial.println("Ready"); // Print "Ready" to the Serial Monitor
}
void loop() {
  dmd.selectFont(Arial_Black_16); // Select the font for the display
  dmd.drawMarquee(message, max_char, (32 * DISPLAYS_ACROSS) - 1, 0); // Set up the marquee with the message
  long start = millis();
  long timer = start;
  boolean ret = false;
  while (!ret) {
    if ((timer + 30) < millis()) {
      ret = dmd.stepMarquee(-1, 0); // Move the text left by one step
      timer = millis(); // Reset the timer
    }
  }
}
Understanding the Code:
Let’s break down the code step by step for beginners:
1. Library Inclusions
#include <SPI.h>Â Â Â Â Â Â Â Â
#include <DMD.h>
#include <TimerOne.h>
#include "SystemFont5x7.h"
#include "Arial_black_16.h"
- SPI.h: Enables communication between the Arduino and the P10 LED module via SPI protocol.
- DMD.h: Handles the LED display functions such as text drawing and scanning.
- TimerOne.h: Manages timing using interrupts for smooth scrolling.
- SystemFont5x7.h and Arial_black_16.h: Define fonts for text display.
2. Display Setup
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
- DISPLAYS_ACROSS and DISPLAYS_DOWN are set to 1, indicating we are using a single P10 module.
- If you have more modules, increase these numbers accordingly.
3. Message Variables
#define max_char 1000
char message[] = “Welcome to Nicrobit”;
- max_char: Sets the maximum number of characters for the message.
- message[]: Stores the text to be displayed. You can change this to any message you like.
4. ScanDMD Function
void ScanDMD() {
  dmd.scanDisplayBySPI();
}
- This function scans the LED matrix display to update the LEDs. It’s called repeatedly to refresh the display.
5. Setup Function
void setup() {
  Serial.begin(9600);
  Timer1.initialize(5000);
  Timer1.attachInterrupt(ScanDMD);
  dmd.clearScreen(true);
  Serial.println("Ready");
}
- Serial.begin(9600): Initializes the serial communication at a baud rate of 9600 for debugging.
- Timer1.initialize(5000): Sets up a timer with a 5ms interval.
- Timer1.attachInterrupt(ScanDMD): Links the ScanDMD function to the timer interrupt, ensuring the display is updated regularly.
- dmd.clearScreen(true): Clears any previous data from the display.
6. Main Loop
void loop() {
  dmd.selectFont(Arial_Black_16);
  dmd.drawMarquee(message, max_char, (32 * DISPLAYS_ACROSS) - 1, 0);
  long start = millis();
  long timer = start;
  boolean ret = false;
  while (!ret) {
    if ((timer + 30) < millis()) {
      ret = dmd.stepMarquee(-1, 0);
      timer = millis();
    }
  }
}
- dmd.selectFont(Arial_Black_16): Sets the font for the text. You can also use SystemFont5x7 for a different style.
- dmd.drawMarquee(): Sets up the scrolling marquee with the message.
- stepMarquee(): Scrolls the text left by one step every 30ms, creating a smooth animation.
Customising the Code:
- Change the Message:
- Update the message[] array to display different text:
char message[] = "Hello, Arduino!";
- Adjust Scrolling Speed:
- Modify the scrolling speed by changing the interval in the loop:
if ((timer + 50) < millis()) {
-
- Increasing the value slows down the scrolling speed, and decreasing it makes it faster.
- Add More Modules:
- If you have multiple P10 LED Modules, change the DISPLAYS_ACROSS value. For two modules:
#define DISPLAYS_ACROSS 2
Troubleshooting Tips:
- Issue 1: Compiling Error
- Ensure you have installed all required libraries. If you see an error, go to Sketch > Include Library > Manage Libraries and install the missing ones.
- Issue 2: Display Not Showing Text
- Double-check your wiring, especially the data and clock pins.
- Issue 3: Flickering Display
- This can be due to power issues. Make sure you have a stable 5V power supply with enough current.
Conclusion:
This setup is a simple way to get your P10 LED Module to display scrolling text using an Arduino. It’s an excellent beginner project for learning about LED displays and Arduino programming.
Try it out, and let me know how it goes in the comments. If you run into any problems or have questions, our team is here to help.



