Hello Guys, In this blog I will guide you to use the internal RTC of ESP32. Now no need to rely on external RTC chips which not only increases the size of PCB, It also increases the cost of the BOM. By using this technique you can easily implement your RTC-based application without using external RTC or any NTP server.
The best part of this project is that you just need an ESP32 board and one USB cable to program it. This ESP32 RTC can work even offline.
This guide is based on the Arduino framework using ESP32 Arduino core. To use the internal RTC functionality of ESp32, You have to install ESP32Time Library for Arduino.
You can do it by visiting Sketch >> Include Library >> Manage Libraries section.
Now search for ESP32Time and install the below library by fbiego by clicking on the install button. It will take a few seconds to install.
2 Comments
The internal RTC resets every time the ESP32 is power on, so it has to be set every time. Your code will set the same time, which will become increasingly wrong. You need either an external RTC or a quick call to NTP to get the current time..
ReplyDeleteHi @slugsie, It is basically a real-time counter instead of clock.
Delete