Build a digital clock with Matrix P10 LED based on Arduino UNO. LED Matrix P10 is now often used for displays such as text display (moving sign / running text). In addition to practical, LED module Matrix P10 is also flexible to development. Just adjust to the size of writing / display that we will make.
Hardware Requirement
- LED Matrix P10 Module
- Arduino UNO
- Power supply +5 Volt
- RTC DS1307 Module
Modul RTC DS1307 | Source
Schematic
Arduino - LED Matrix P10 (DMD) Wiring
Arduino - RTC DS1307 Wiring
Source Code/Sketch
#include <Wire.h>
#include <DS1307.h>
#include <SPI.h>
#include <DMD.h>
#include <TimerOne.h>
#include "SystemFont5x7.h"
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
int a;
char b[8];
String str;
void ScanDMD()
{
dmd.scanDisplayBySPI();
}
void setup()
{
RTC.stop();
RTC.start();
Serial.begin(9600);
Timer1.initialize( 5000 );
Timer1.attachInterrupt( ScanDMD );
dmd.clearScreen( true );
}
void loop()
{
str="";
int h(RTC.get(DS1307_HR,true));
int m(RTC.get(DS1307_MIN,false));
dmd.clearScreen( true );
str=String(h)+":"+String(m);
str.toCharArray(b,6);
dmd.selectFont(SystemFont5x7);
dmd.drawString( 1, 4, b, 5, GRAPHICS_NORMAL );
delay(5000);
}
#include <DS1307.h>
#include <SPI.h>
#include <DMD.h>
#include <TimerOne.h>
#include "SystemFont5x7.h"
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
int a;
char b[8];
String str;
void ScanDMD()
{
dmd.scanDisplayBySPI();
}
void setup()
{
RTC.stop();
RTC.start();
Serial.begin(9600);
Timer1.initialize( 5000 );
Timer1.attachInterrupt( ScanDMD );
dmd.clearScreen( true );
}
void loop()
{
str="";
int h(RTC.get(DS1307_HR,true));
int m(RTC.get(DS1307_MIN,false));
dmd.clearScreen( true );
str=String(h)+":"+String(m);
str.toCharArray(b,6);
dmd.selectFont(SystemFont5x7);
dmd.drawString( 1, 4, b, 5, GRAPHICS_NORMAL );
delay(5000);
}
How it Works
Digital clock will be shown on the LED Matrix P10 module with interesting view
Download the required file.
I am facing a error...
ReplyDelete#include <../Wire/Wire.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno
But i already installed Wire.h library.
Help me in this case..
arduino ide version that u use?
Deleteim using 1.6.8
I am using 1.8.5
DeleteWire.h file is found in my library directory. But while compiling, i am getting error.
#include <../Wire/Wire.h>
Deleteshould be
#include
try #include
Delete#include <../Wire/Wire.h>
Deleteshould be
........#include "Wire.h"........
#include <../Wire/Wire.h>
ReplyDeleteshould be
#include
Arduino: 1.6.8 (Windows 8.1), Board: "Arduino/Genuino Uno"
ReplyDeleteIn file included from C:\Users\mnbvcxsz\Downloads\Jamp10_New\Jamp10_New.ino:4:0:
C:\Program Files (x86)\Arduino\libraries\DMD-master/DMD.h:52:2: warning: #warning CHANGE THESE TO SEMI-ADJUSTABLE PIN DEFS! [-Wcpp]
#warning CHANGE THESE TO SEMI-ADJUSTABLE PIN DEFS!
^
C:\Users\mnbvcxsz\Downloads\Jamp10_New\Jamp10_New.ino: In function 'void setup()':
Jamp10_New:19: error: 'RTC' was not declared in this scope
RTC.stop();
^
C:\Users\mnbvcxsz\Downloads\Jamp10_New\Jamp10_New.ino: In function 'void loop()':
Jamp10_New:29: error: 'RTC' was not declared in this scope
int h(RTC.get(DS1307_HR,true));
^
Jamp10_New:29: error: 'DS1307_HR' was not declared in this scope
int h(RTC.get(DS1307_HR,true));
^
Jamp10_New:30: error: 'DS1307_MIN' was not declared in this scope
int m(RTC.get(DS1307_MIN,false));
^
exit status 1
'RTC' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Some time show multiple libraries error. How to resolve
ReplyDeleteI got an error,
ReplyDeleteIn "#include <..Wire/Wire.h>
Modify line 43 in DS1307.h: #include <../Wire/Wire.h> to #include
ReplyDeleteModify line 43 in DS1307.h: "#include <../Wire/Wire.h>" to "#include"
ReplyDeleteCompliments! Does your code work for Displays with HUB08 protocol (1R1G1Y)? Thanks
ReplyDeleteElgato Key LED Panel in UAE, Professional Studio LED Panel in UAE, PC and Mac LED Panel in UAE
ReplyDeletehttps://pcdubai.com/elgato-key-light/
Elgato Key LED Panel in UAE, Safe Shopping Multiple Payment Options Express Delivery PC Dubai Moneyback Guarantee.
1634787603652-15
Compiling Error
ReplyDeleteThis is excellent information. I got some new ideas. Thank you for your post. Malco technology offers the commerical led display screen in Dubai at a very affordable cost.
ReplyDelete