Comments on: ESP32: Guide for DS3231 Real Time Clock Module (RTC) — Getting Time and Setting Alarms https://randomnerdtutorials.com/esp32-ds3231-real-time-clock-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Thu, 22 May 2025 08:08:36 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: MoSalah https://randomnerdtutorials.com/esp32-ds3231-real-time-clock-arduino/#comment-1046427 Thu, 22 May 2025 08:08:36 +0000 https://randomnerdtutorials.com/?p=164824#comment-1046427 In reply to Said.

the problem is when you use rtc.adjust(), you readjusting the rtc every time the code runs, so you need to adjust once. first, use rtc.adjust() and upload the sketch, then immediately after that remove the rtc.adjst() then reupload the sketch again.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-ds3231-real-time-clock-arduino/#comment-1031767 Mon, 28 Apr 2025 09:49:38 +0000 https://randomnerdtutorials.com/?p=164824#comment-1031767 In reply to Daniel.

Hi.
You’re right.
I’m sorry for the issue.
I’ll fi that.
Regards,
Sara

]]>
By: Daniel https://randomnerdtutorials.com/esp32-ds3231-real-time-clock-arduino/#comment-1031562 Sun, 27 Apr 2025 21:51:17 +0000 https://randomnerdtutorials.com/?p=164824#comment-1031562 Hello, thanks for this tutorial. It was very helpful in checking that my DS3231 worked.

However, there seems to be an mistake in the first program where on line 23 it says “if (! rtc.lostPower()) {“, which leads to the time being reset only if the RTC doesn’t lose power, which is probably the opposite of what should happen. I changed it to ” if (rtc.lostPower()) {” and it works as it should.

Can you please fix this? I imagine it might be a bit of a problem for newbies, and even for me it was rather troublesome.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-ds3231-real-time-clock-arduino/#comment-1024765 Tue, 08 Apr 2025 09:41:12 +0000 https://randomnerdtutorials.com/?p=164824#comment-1024765 In reply to Juergen.

Hi.
You’re right.
Thanks for noticing.
It is fixed now.
Regards,
Sara

]]>
By: Juergen https://randomnerdtutorials.com/esp32-ds3231-real-time-clock-arduino/#comment-1024420 Mon, 07 Apr 2025 13:43:56 +0000 https://randomnerdtutorials.com/?p=164824#comment-1024420 Hello,
Thanks again for the post. Both programs work for me.
However, I noticed that something was swapped (program code or the associated text).
Juergen

]]>
By: Frank https://randomnerdtutorials.com/esp32-ds3231-real-time-clock-arduino/#comment-1016291 Fri, 14 Mar 2025 00:23:43 +0000 https://randomnerdtutorials.com/?p=164824#comment-1016291 Hi, thanks for the great tutorial.
I expected wire.h to be included/started for the I2C communication.
It is not in your example. Can you please confirm/explain it is not necessary?

]]>
By: Said https://randomnerdtutorials.com/esp32-ds3231-real-time-clock-arduino/#comment-1016029 Thu, 13 Mar 2025 01:45:46 +0000 https://randomnerdtutorials.com/?p=164824#comment-1016029 Hello Sara,
I wanted to set the time for the RTC module, that is connected to a battery, once for all. So, I have set the current time (rtc.adjust) using ntp then uploaded a new sketch that does not use ntp. I noticed that the time rtc.now() is delayed by around 6 min. I tried another RTC module, but still the same problem (almost).
What could be the issue?
Thank you very much.

]]>