akk47
Published © MPL-2.0

First ever arduino digital watch without rtc module

Each time we make a watch using arduino to fetch time but I added some logic to arduino to accurately fetch time.

AdvancedFull instructions provided7,517
First ever arduino digital watch without rtc module

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Alphanumeric LCD, 16 x 2
Alphanumeric LCD, 16 x 2
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1
Solderless Breadboard Full Size
Solderless Breadboard Full Size
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
fritzing

Hand tools and fabrication machines

Adafruit Soldering iron kit.

Story

Read more

Schematics

Scheamatics for watch without rtc

Code

Code for the first ever watch without rtc.

C/C++
//change the longest, middle and shortest value according to your time and then upload the code.

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

//change the longest's value to change seconds.
int longest=0;

//change the middle's value to change minutes.
int middle=0;

//change the shortest's value to change hours.
int shortest=0;

void setup() {
  lcd.begin(16, 2);
  //Time here is displayed in IST.
  lcd.print("Time in IST -");
}

void loop() {
  if(longest<60){
    delay(1000);
    longest=longest+1;
  }
  else{
    longest=00;
  }
  
  if(longest>59){
    middle=middle+1;
  }
  else{
    middle=middle;
  }
  
  if(middle<60){
    middle=middle;
    shortest=shortest;
  }
  else{
    middle=0;
    shortest=shortest+1;
  }

  if(shortest<24){
    shortest=shortest;
  }
  else{
    shortest=0;
  }
    
  lcd.setCursor(0, 1);
  lcd.print(shortest);
  lcd.print(":");
  lcd.print(middle);
  lcd.print(":");
  lcd.print(longest);
  lcd.print("________");
  
}

Credits

akk47

akk47

7 projects • 9 followers

Comments