Interfacing P10 LED Display With Arduino
Interfacing P10 LED Display With Arduino
Engineering Projects
Projects for Engineering
Students
ARDUINO PROJECTS IC 741 PROJECT IC 555 PROJECTS ELECTRONICS PROJECTS ELECTRICAL PROJECTS CONTACT ABOUT US
You are here Home Electronics Projects Interfacing P10 LED Display with Arduino
The P10 LED display is a single color (red, blue, and yellow), high brightness, lower power
consumption, and long lifetime display module designed for semi-outdoor use. One
display module we are using contains 16×32 = 512 LEDs. In the tutorial “
“, you will learn:
▪ This pin is used to control the brightness of the LED panel, by giving a PWM Bearing Capacity Theories (17)
pulse to it.
C Based Project (18)
▪ These are called multiplex select pins. They take digital input to select any
C++ Based Projects (5)
multiplex rows
Civil Projects (123)
▪ These are the regular shift register control pins
Co�erdams (3)
▪ This pin is for data input in PWM form.
Computer Projects (24)
Microwaves (22)
Figure 2: Wiring Diagram of interfacing P10 display with Arduino power supply (48)
Python (1)
Robotics (5)
Tech (11)
Uncategorized (2)
Connect the P10 LED Display with Arduino according to the pin con�guration shown in
the above �gure. Here P10 Display module consists of 16 pin connectors (DMD Pins). So Top Posts & Pages
connect DMD-pins 3, 5, 7, 9, 11, 13 & 15, to a ground pin of the Arduino board (as shown
in the �gure). Then connect DMD-Pin 1 ( pin) to D9 (PWM pin of nano). Similarly, 50+ Top 555 Timer IC
connect DMD-Pin 2 ( ) to D6 (PWM pin of nano) and DMD-Pin 4 ( ) to D7(nano). Lastly Projects
connect DMD-Pins 8,10 &12 to nano pins D13, D8 & D11 for and inputs
Arduino PH Meter using PH
respectively. DMD-Pins 6,14 &16 are kept open, as shown in Figure 2.
Sensor
Components required for Interfacing P10 LED Display with 12v, 7Ah Smart Battery
▪ Lastly, the font <Arial14> displays characters in the most widely known Arial Font
style. This style is a tiny bit smaller in size than the <Arial_black_16>. It consumes 10
row LEDs by 14 column LEDs (i.e. 140 LEDs; Font width=10; Font height=14). Choosing
this font type only allows a single row of characters similar to the Arial_black_16 font
style.
First, you need the libraries required to operate and communicate with the display
module. The stable ones are <DMD.h> and <SPI.h> which ensure smooth coordination
between the Arduino controller and the display module. Another library called
<TimerOne.h> is needed provides interrupts.
Now, you need to include their libraries to use the font style “SystemFont5x7” or any
other font style while displaying characters. To use the SystemFont5x7 font style you
need to download the SystemFont5x7.h library �le. Similarly, for “Arial_black_16” and
“Arial14”, you need to download the Arial_black_16.h and Arial14.h library �les.
Library link: DMD library includes DMD.h, SystemFont5x7.h, Arial_black_16.h, Arial14.h
1 #include <SPI.h>
2 #include <DMD.h>
3 #include <TimerOne.h>
4 #include "SystemFont5x7.h"
5 #include "Arial_black_16.h"
6 #include "Arial14.h"
7 #define DISPLAYS_ACROSS 1
8 #define DISPLAYS_DOWN 1
9 String str;
10 char b[8];
11 DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
12
13 void ScanDMD(){
14 dmd.scanDisplayBySPI();
15 }
16
17 void setup() {
18 Serial.begin(9600);
19 Timer1.initialize(5000);
20 Timer1.attachInterrupt(ScanDMD);
21 dmd.clearScreen(true);
22 }
23
24 void loop()
25 {
26 int slen = 0;
27 dmd.clearScreen( true );
28 /*--------------------------------------- Display using SystemFont --------------------------
29 dmd.selectFont(SystemFont5x7);
30 str="HELLO";
31 slen = str.length()+1;
32 str.toCharArray(b,slen);
33 dmd.drawString(1,0,b,slen,GRAPHICS_NORMAL);
34 str="WORLD";
35 slen= str.length()+1;
36 str.toCharArray(b,slen);
37 dmd.drawString(1,8,b,slen,GRAPHICS_NORMAL);
38 delay(4000);
39 dmd.clearScreen( true );
40 delay(2000);
41
42 /*--------------------------------- Display using Arial_black_16 ----------------------------
43 dmd.selectFont(Arial_Black_16);
44 str="BEP";
45 slen = str.length()+1;
46 str.toCharArray(b,slen);
47 dmd.drawString(2,1,b,slen,GRAPHICS_NORMAL);
48 delay(4000);
49 dmd.clearScreen( true );
50 delay(2000);
51
52 /*---------------------------------- Display using Arial14 ---------------------------------
53 dmd.selectFont(Arial_14);
54 str="BEP!";
55 slen = str.length()+1;
56 str.toCharArray(b,slen);
57 dmd.drawString(4,1,b,slen,GRAPHICS_NORMAL);
58 delay(4000);
59 dmd.clearScreen( true );
60 delay(2000);
61 }
Some important libraries such as <SPI.h> for Serial communication, <DMD.h> for P10
display operations and <TimerOne.h> for interrupts tasks need to be included in the
program. Include the display font library <Arial_black_16.h> and <SystemFont5x7.h> for
large and small sized text displays.
Initialize a char type array “ ” and string variable “ ” as shown in code. Then de�ne the
number of modules we have to display_across and display_down. In our case we are
using only one module, so Display_accross and Display_down value will be 1. Lastly,
initialize an object of the DMD class to carry out display operations with parameters:
“ and ”.
function will check for any incoming data from the Arduino side through
the SPI Terminals. If yes, then it will trigger an interrupt pin for certain events.
Then �nally we utilize the string variable “ to store some string and convert it to byte
form using the function and store it in a byte type array . Then
select a font using and display the contents using as shown
above. Lastly, clear the screen after a 1-sec delay using
All these declaring, de�ning, and “void setup()” part of the code for scrolling action is
identical to the above static ones. So, to display a sliding character only the code in “void
loop()” needs some changes. Here we use two new function of DMD library called
and . Also, is used to determine the speed of
scrolling.
The function starts drawing the scrolling text onto the DMD. The text is
read from an array of char “ ”. The drawMarquee function is also initialized with the
length of the text message, and with the position from where the message is to appear.
In this example, scrolling will start from the right side of the DMD, (i.e. the LED at the 31st
column and 1st row). Whereas, the function is responsible for updating the
texts. Its parameters control the direction of the scroll. With (-1,0), the text will move 1 –
LED to the left and 0 – LED vertically. But, If you want to move the text toward the right,
use (1,0).
Capabilities and Limitation of Sample and Di�erent Ways Of Joining Metals Without
Hold Circuit Welding
LEAVE A COMMENT
Comment
Name
Email
Website URL
ADD COMMENT
Recent Posts