Build a large-format scrolling text display using P10 LED panels and an ESP8266. Perfect for classrooms, storefronts, or home decor. Customize the message and watch it scroll across the panels in real time.
Arrange your P10 LED panels in a 2x1 configuration and connect them to each other. Use connecting cables to hook up the data input of the first panel to the ESP8266. Make sure your power supply can adequately power both the ESP8266 and the P10 panels.
Open the Arduino IDE, go to Tools - Manage Libraries, and search for DMDESP. Install it. This library handles the P10 panel communication so you can focus on the message logic.
Download the sketch from GitHub and open it in the Arduino IDE. Modify the teks array to display your own custom message. Select your ESP8266 board and port, then upload.
Power on the ESP8266 and P10 panels. Your custom message should begin scrolling immediately. Adjust brightness and scroll speed in the sketch to suit your environment.
This project uses a standard sketch and a sketch that uses a webserver, both sketches are available on GitHub.
//P10 ESP8266 working code
#include <DMDESP.h>
#include <fonts/ElektronMart6x12.h>
#include <Wire.h>
// SETUP DMD
#define DISPLAYS_WIDE 2 // Column
#define DISPLAYS_HIGH 1 // Row
// Number of P10 Panels used (COLUMN, ROW)
DMDESP Disp(DISPLAYS_WIDE, DISPLAYS_HIGH);
void setup() {
Serial.begin(9600);
Disp.start();
Disp.setBrightness(255);
Disp.setFont(ElektronMart6x12);
}
void loop() {
Disp.loop(); // Run Disp loop to refresh LED
TeksJalan(0, 30); // y position, speed;
}
// SCROLLING TEKS
static char *teks[] = { "pythonessentials.com BUILD + CODE + CREATE devstem.org/arduino-course " };
void TeksJalan(int y, uint8_t kecepatan) {
static uint32_t pM;
static uint32_t x;
int width = Disp.width();
int height = Disp.height();
Disp.setFont(ElektronMart6x12); //
int textWidth = Disp.textWidth(teks[0]);
if ((millis() - pM) > kecepatan) {
pM = millis();
if (x < textWidth + width) {
++x;
} else {
x = 0;
return;
}
Disp.drawText(width - x, (height / 2) - 6, teks[0]); // Center the text vertically
}
}
Check all connections between the ESP8266 and the P10 panels. Make sure the data lines are secure and not loose.
Verify that your power supply voltage and amperage are adequate for both the ESP8266 and the number of P10 panels you are using.
Adjust the brightness setting in the sketch or check the refresh rate settings in the DMDESP library documentation.
The free Introduction to Arduino course on DevSTEM covers everything you need before tackling beginner projects like this.
Start the Course