ESP32 Real Time Clock (RTC) with DS3231 Project
The ESP32 Real Time Clock (RTC) with DS3231 project demonstrates how to use the DS3231 RTC module to keep track of real-time data with high accuracy using an ESP32 microcontroller. This project is ideal for applications that require precise timekeeping, such as data logging, scheduling tasks, and alarms.
Components Needed
- Power Supply
Block Diagram
Circuit Setup
Connecting the DS3231 RTC to ESP32:
Instructions
Setup:
Initialize serial communication for debugging purposes using
Initialize I2C communication using
Create an RTC_DS3231 object to interact with the RTC module.
Check if the RTC is connected properly using
If the RTC lost power, set the time using
Operation:
- Use
- Print the current date and time to the Serial Monitor using