Header Ads Widget

Arduino clock by using RTC and LCD


Arduino clock :

Hi guys, welcome to meworkstelugu in this section. We make a project Arduino clock using RTC clock module and  16*2 LCD display.
Arduino clock project will be help to show the time and date. This very easy project you can easily understand this project. Now let's talk about what are the components required for this project.

Arduino clock with RTC components : 

  • Arduino                     BuyNow
  • Breadboard               BuyNow
  • connecting wires      BuyNow
If you want to buy Arduino components, I am giving my affiliate links. If you buy the components using my affiliate links, it will help to our channel and website growth. so do these small help.

Making video of Arduino clock by using RTC and LCD :

Watch the below video. This video will be help to make this project.



Arduino uno clock circuit diagram :

connect the all the components as shown in the below circuit diagram



Arduino uno clock code:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <RTClib.h>

RTC_DS1307 rtc;
LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

char daysOfTheWeek[7][12] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};


void setup () 
{
  Serial.begin(9600);
 // lcd.prinit();                       
  
  lcd.backlight();
  lcd.begin();
  
  if (! rtc.begin()) 
  {
    lcd.print("Couldn't find RTC");
    while (1);
  }

  if (! rtc.isrunning()) 
  {
    lcd.print("RTC is NOT running!");
  }
  
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));//auto update from computer time
    //rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0));// to set the time manualy 
}

void loop () 
{
    DateTime now = rtc.now();
    
    lcd.setCursor(0, 0);
    lcd.print(daysOfTheWeek[now.dayOfTheWeek()]);
    lcd.print("  ");
    lcd.print(now.day());
    lcd.print('-');
    lcd.print(now.month());
    lcd.print('-');
    lcd.print(now.year());

    lcd.setCursor(0, 1);
    lcd.print("TIME : ");
    lcd.print(now.hour());
    lcd.print(':');
    lcd.print(now.minute());
    lcd.print(':');
    lcd.print(now.second());
    //lcd.print("   ");

}


If you have any doubts regarding to this project, contact me on Instagram or comment on YouTube video. I will help with my best.
ignore these tages :Arduino clock by using RTC and LCD _arduino clock_ arduino clock alarm_ arduino clock rtc_arduino uno clock_ arduino clock module

Post a Comment

0 Comments