Notifications
Clear all

3231 RTC Example

5 Posts
3 Users
3 Likes
488 Views
(@ewilson100)
Member
Joined: 2 years ago
Posts: 15
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)
Member
Joined: 2 years ago
Posts: 1900
 

@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, WiFi 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 reacted
ReplyQuote
(@ewilson100)
Member
Joined: 2 years ago
Posts: 15
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 2 years ago 3 times by ewilson100

   
Inst-Tech reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6910
 

@ewilson100 I would use RTClib from Adafruit.

Screen Shot 2022 06 22 at 15.18.32

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inst-Tech reacted
ReplyQuote
(@ewilson100)
Member
Joined: 2 years ago
Posts: 15
Topic starter  

Thanks, Ron!

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

Ed Wilson


   
ReplyQuote