Devices & Components
Arduino Uno Rev3
Jumper wires (generic)
Solderless Breadboard Full Size
Alphanumeric LCD, 16 x 2
Rotary potentiometer (generic)
Hardware & Tools
Soldering iron kit.
Software & Tools
fritzing
Arduino IDE
Project description
Code
Code for the first ever watch without rtc.
c_cpp
1//change the longest, middle and shortest value according to your time and then upload the code. 2 3#include <LiquidCrystal.h> 4LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 5 6//change the longest's value to change seconds. 7int longest=0; 8 9//change the middle's value to change minutes. 10int middle=0; 11 12//change the shortest's value to change hours. 13int shortest=0; 14 15void setup() { 16 lcd.begin(16, 2); 17 //Time here is displayed in IST. 18 lcd.print("Time in IST -"); 19} 20 21void loop() { 22 if(longest<60){ 23 delay(1000); 24 longest=longest+1; 25 } 26 else{ 27 longest=00; 28 } 29 30 if(longest>59){ 31 middle=middle+1; 32 } 33 else{ 34 middle=middle; 35 } 36 37 if(middle<60){ 38 middle=middle; 39 shortest=shortest; 40 } 41 else{ 42 middle=0; 43 shortest=shortest+1; 44 } 45 46 if(shortest<24){ 47 shortest=shortest; 48 } 49 else{ 50 shortest=0; 51 } 52 53 lcd.setCursor(0, 1); 54 lcd.print(shortest); 55 lcd.print(":"); 56 lcd.print(middle); 57 lcd.print(":"); 58 lcd.print(longest); 59 lcd.print("________"); 60 61} 62
Downloadable files
Scheamatics for watch without rtc
Scheamatics for watch without rtc

Scheamatics for watch without rtc
Scheamatics for watch without rtc

Comments
Only logged in users can leave comments