Notifications
Clear all

3231 RTC Example


ewilson100
(@ewilson100)
New Member
Joined: 1 week ago
Posts: 4
Topic starter  

I am a new user of this forum, so please bear with me as I learn how to navigate this resource; I will introduce myself at a later time.

I just acquired a 3231 RTC module and would like to modify the example elsewhere on the Workshop web page ( https://dronebotworkshop.com/real-time-clock-arduino/) that uses the Tiny RTC module. I did change the #include header file to DS3231, but the code will not compile. Obviously some additional modifications must be made, but these are not obvious to me at the moment.

I was wondering if any other forum members have successfully modified this code to use the 3231?

Thanks,

Ed Wilson

 


Quote
Inq
 Inq
(@inq)
Reputable Member
Joined: 3 months ago
Posts: 394
 

@ewilson100 - Pre-welcome to the forum.  😉  You didn't mention your general skill level, so apologies if this is too remedial.  I assume you're using the Arduino IDE???

I don't use any RTC's, but this may simply be a library problem.  Bill's example is using DS1307, so it won't work with the 3231 and just changing the include statement doesn't automatically fix that.  Go into the menu Tools/Manage Libraries...  Search for "3231" and install the library for it.  Once you do that, there will be examples available under the File/Examples menu option.

Let us know if that gets you closer to a solution.

VBR,

Inq

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, Access Point Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


Inst-Tech liked
ReplyQuote
ewilson100
(@ewilson100)
New Member
Joined: 1 week ago
Posts: 4
Topic starter  

Thanks for the response and the welcome, Inq!

I suspect that my problem might be related to the various libraries I have installed; there are several for the DS3231 and perhaps when I use the #include header statement, it is coming from the wrong library. I think that I will delete all libraries related to the DS3231 and start "clean".

Bill's example with the RTC, OLED and temperature/humidity sensor is exactly what I am trying to get working. The OLED and the temperature/humidity part of the project is working well...just want to add an RTC which I would like to periodically update from an NTP time server.

I have a lot of experience in electronics and I am reasonably proficient in programming, but I am very new to the Arduino environment.

Ed Wilson

This post was modified 4 days ago 3 times by ewilson100

Inst-Tech liked
ReplyQuote
Ron
 Ron
(@zander)
Noble Member
Joined: 2 years ago
Posts: 2262
 

@ewilson100 I would use RTClib from Adafruit.

Screen Shot 2022 06 22 at 15.18.32

It is considered poor judgement to traverse a chasm in 2 leaps.


Inst-Tech liked
ReplyQuote
ewilson100
(@ewilson100)
New Member
Joined: 1 week ago
Posts: 4
Topic starter  

Thanks, Ron!

I will give that a try today if I can find the time to "play".

Ed Wilson


ReplyQuote