Annlee Fores
Published © GPL3+

Simple Arduino Digital Clock Without RTC

A simple Arduino clock without RTC module for beginners.

EasyWork in progress1 hour79,684
Simple Arduino Digital Clock Without RTC

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Standard LCD - 16x2 White on Blue
Adafruit Standard LCD - 16x2 White on Blue
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
10 K rotary potentiometer
×1
Resistor 10k ohm
Resistor 10k ohm
×2
Resistor 221 ohm
Resistor 221 ohm
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×2
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×30
12V/29A Power Supply
OpenBuilds 12V/29A Power Supply
optional
×1
SparkFun Solder-able Breadboard - Mini
SparkFun Solder-able Breadboard - Mini
optional
×1

Software apps and online services

Autodesk 123d Circuits
Used to draw the circuit
Arduino IDE
Arduino IDE
To upload code to Arduino

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
In case you are using the perf board

Story

Read more

Custom parts and enclosures

The Real Box Template

template 2

template 3

Schematics

Digital Arduino Clock Circuit Diagram

Just follow the circuit and build it.
Screenshot (145) wxzytl8mmh

Code

Digital Arduino Clock Code

C/C++
Copy, Paste the code to Arduino IDE -> Upload to the board -> Try out and then modify the code\

[Copy,Paste,Upload,Modify]
/*
Digital Winding Clock - Arduino Clock for beginners  
No RTC,
Just set it to exact time using the push buttons each time you switch on the clock

Made by Techno (sǝɹoɟ ǝǝןuuɐ)

Feel free to modify
*/

#include <LiquidCrystal.h>

LiquidCrystal
lcd(12,11,5,4,3,2);

int h=12;
int m;
int s;
int flag;
int TIME;

const int hs=8;
const int ms=9;

int state1;
int state2;

void setup()
{
  lcd.begin(16,2);
}
void loop()
{

 lcd.setCursor(0,0);
 s=s+1;
 lcd.print("TIME:");
 lcd.print(h);
 lcd.print(":");
 lcd.print(m);
 lcd.print(":");
 lcd.print(s);

 if(flag<12)lcd.print("AM");
 if(flag==12)lcd.print("PM");
 if(flag>12)lcd.print("PM");
 if(flag==24)flag=0;

 delay(1000);
 lcd.clear();
 if(s==60){
  s=0;
  m=m+1;
 }
 if(m==60)
 {
  m=0;
  h=h+1;
  flag=flag+1;
 }
 if(h==13)
 {
  h=1;
 }
 lcd.setCursor(0,1);

 lcd.print("HAVE A NICE DAY");

 //-------Time
// setting-------//
 state1=digitalRead(hs);

 if(state1==1)
{
  h=h+1;
  flag=flag+1;
  if(flag<12)lcd.print("AM");
  if(flag==12)lcd.print("PM");
  if(flag>12)lcd.print("PM");
  if(flag==24)flag=0;
  if(h==13)h=1;
}
state2=digitalRead(ms);
if(state2==1){
  s=0;
  m=m+1;

}
}
 
 

Credits

Annlee Fores

Annlee Fores

2 projects • 39 followers
Just a Simple Maker ;)
Contact

Comments