Professional Documents
Culture Documents
Digital Clock Using Tinkercad: Step 1: Drag and Drop The Components To The Workspace
Digital Clock Using Tinkercad: Step 1: Drag and Drop The Components To The Workspace
by veerapec2012
Tinkercad is one of the best software tools for 3D class="supplies-heading">Supplies: Arduino Uno R3
modeling and simulating the circuits. I have created a
Digital Clock circuit using Tinkercad. I have used Arduino LCD 16x2
Uno R3, LCD 16x2, Potentiometer and a 220-ohm resistor
for making the circuit. I used a simple sketch, which is Potentiometer
attached and explained in this instructable. I ran the
sketch and found my digital clock working ne after and a 220-ohm resistor
setting the present time and date using serial monitor.
Create a circuit project in Tinkercad after login using your account details. Drag and drop the components mentioned in
the supplies to the workspace. You can also use the search bar for nding the required components, which are available
next to the workspace in the right hand side.
1. Connect the 5V pin from Arduino Uno to the positive digital pin 12 of the Arduino through the breadboard.
rails of the breadboard
8. Connect the Read/Write (RW) pin of the LCD to the
2. Connect the ground (GND) pin from Arduino Uno to negative rail of the breadboard.
the negative rails of the breadboard
9. Connect the Enable (E) pin of the LCD to the digital pin
3. Place the potentiometer on the breadboard, and 11 of the Arduino through the breadboard.
connect terminals 1 and 2 of the potentiometer to the
positive and negative rails of the breadboard, 10. Data pins DB0 to DB3 of the LCD are not connected
respectively. to anything because we are using 4-wire mode (only
four pins are connected to the Arduino).
4. Connect the ground (GND) pin of the LCD to the
negative rail of the breadboard. 11. Data pins DB4 to DB7 of the LCD are connected to
the Arduino digital pins 5 to 2, respectively.
5. Connect the power (VCC) pin of the LCD to the
positive rail of the breadboard. 12. LED Anode of the LCD is connected to the positive
rail of the breadboard through 220 ohm resistor, and
6. Connect the contrast (V0) pin of the LCD to the wiper LED Cathode of the LCD is connected to the negative rail
pin of the potentiometer through the breadboard. of the breadboard.
Click on the "Code" option available in the Tinkercad and int k=0;
write the following program in it.
void setup()
#include LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
{
int ss,mm,hh,MM,DD,YYYY,AP;
Serial.begin(9600);
} {
{ }
/*After asking for details k=1 so never asks for // assumes that all months have 28 days
instructions again*/
if(DD==28)
if(k<=0)
{
{
DD=1;
/*Details() - Asks for time and date*/
MM=MM+1;
Details();
if(MM==13)
}
{
ss=ss+1;
MM=1;
if(ss==60)
YYYY=YYYY+1;
{
}
ss=0;
}
mm=mm+1;
}
if(mm==60)
if(hh==13)
{
{
mm=0;
hh=1;
hh=hh+1;
}
if(hh==12)
}
{
}
AP=AP+1;
/*printTime2 - adds one second and displays time on
printTime2(); LCD display*/
{ MM=Serial.parseInt();
Serial.println(""); line();
{ DD=Serial.parseInt();
hh=Serial.parseInt(); while(Serial.available()==0);
Now the Digital Clock is ready, and you can watch the time and date on it.