In this tutorial, we will learn how to use a DS3231 RTC module with Arduino and get time.
DS3231 RTC Module (Real-Time Clock Module) is used to track the current time and date and generally used in computers, laptops, mobiles, embedded system applications devices, etc.
We want to use the time of day provided by a real-time clock (RTC). These boards have a battery(cell) backup, so the time will be correct even when Arduino is reset or turned off. Also, it has automatic compensation for leap-years and for months with fewer than 31 days. The module can work on both 5v and 3.3v.
DS3231 RTC Arduino Library
We are using the Library which is made by Henning Karlsen. You can also download it from his website, www.rinkydinkelectronics.com.
Circuit Diagram for DS3231 RTC with Arduino
Code for RTC with Arduino
Upload the code and open the serial monitor to view the result.
Display The Time on LCD 16×2 | Arduino Clock
Now we are showing the real-time on an LCD Display using DS3231 and Arduino.
LCD Reference:- Interfacing LCD 16×2 Display with Arduino.
Circuit Diagram for RTC and LCD 16×2
Some More Articles For You: