--> Project I - 19 Digital Clock using LED Matrix P10 Module (Arduino Based) | basic arduino tutorial

Monday, August 7, 2017

Project I - 19 Digital Clock using LED Matrix P10 Module (Arduino Based)

| Monday, August 7, 2017
Digital Clock using LED Matrix P10 Module




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



                                           

LED Matrix P10 Module | Source | Source
           


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);
}

How it Works

Digital clock will be shown on the LED Matrix P10 module with interesting view







Download the required file.

Related Posts

16 comments:

  1. I am facing a error...

    #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..

    ReplyDelete
    Replies
    1. arduino ide version that u use?
      im using 1.6.8

      Delete
    2. I am using 1.8.5
      Wire.h file is found in my library directory. But while compiling, i am getting error.

      Delete
    3. #include <../Wire/Wire.h>

      should be
      #include

      Delete
    4. #include <../Wire/Wire.h>

      should be
      ........#include "Wire.h"........

      Delete
  2. #include <../Wire/Wire.h>

    should be
    #include

    ReplyDelete
  3. Arduino: 1.6.8 (Windows 8.1), Board: "Arduino/Genuino Uno"

    In 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.

    ReplyDelete
  4. Some time show multiple libraries error. How to resolve

    ReplyDelete
  5. I got an error,
    In "#include <..Wire/Wire.h>

    ReplyDelete
  6. Modify line 43 in DS1307.h: #include <../Wire/Wire.h> to #include

    ReplyDelete
  7. Modify line 43 in DS1307.h: "#include <../Wire/Wire.h>" to "#include"

    ReplyDelete
  8. Compliments! Does your code work for Displays with HUB08 protocol (1R1G1Y)? Thanks

    ReplyDelete
  9. Elgato Key LED Panel in UAE, Professional Studio LED Panel in UAE, PC and Mac LED Panel in UAE
    https://pcdubai.com/elgato-key-light/
    Elgato Key LED Panel in UAE, Safe Shopping Multiple Payment Options Express Delivery PC Dubai Moneyback Guarantee.
    1634787603652-15

    ReplyDelete
  10. This 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