RTC Arduino Clock
This project is a real time clock with an Arduino Uno, an RTC module (called tiny RTC) and a common anode 4 digit 7 segment display
Supplies
Arduino Uno
Common Anode 4 digit 7 segment display
470Ω 1/4W resistors (8 pieces)
Tiny RTC module
Some wires to connect them
Schematic
Circuit schematic of the project
Setting the Time
To set time you need download DS1307RTC library and by using example code called Set Time you will program your RTC. After that if your RTC have button cell it will always remember the time and keep track it.
Code
Here is the code. This is not a efficient code at all because I'm not a good programmer but at the end code works and this clock works for about 5-6 months without any problem. The challenge in this code you need to multiplex screen to to show current time.
Principal of operation
Arduino takes the time information from the RTC assigns this to 2 variable "saat" and "dakika" then using mathematical calculations it assigns this information to 4 variables ""bir, iki, uc, dort" which are first, second, third, and fourth digit of the 7 segment display then using bunch if statement code calls 0-9 number functions and repeats this routine so fast (few hundred Hz) our eyes cant see screen's flicker.