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.
Also See:- Clock Time without RTC Module
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.
Code for RTC with Arduino
Upload the code and open the serial monitor to view the result.
Display The Time on LCD 16x2 | Arduino Clock
Now we are showing the real-time on an LCD Display using DS3231 and Arduino.
See Also:- Interfacing LCD 16x2 Display with Arduino.