DS3231 Library Confusion

I’m using a DS3231 RTC and I have noticed that there are a number of libraries for it. There are two versions of DS3231.h, one by jarzebski and one by Andrew Wickert. I have also noticed whilst looking at posts that there is a library called I2C_RTC.h which seems to be popular. There also a number of other libraries.

Ideally, I’d like to pick one library for RTC and stick with it so that I can copy and paste code later.

Is there a good reason why I should pick chose library over others?

One tip is to look at the date for the last update. Go for the youngest.

1 Like

I like this one.
http://reference.arduino.cc/reference/en/libraries/ds3232rtc/

Look at the header file (or documentation, in the unusual case that there is some :slightly_smiling_face:) to see what functions are supported. Some have more support for features than others. If you are interested in the day of the week, see how they handle that. The DS3231 starts with 1 for Sunday. Unix time functions start at 0 for Sunday. Some libraries use the DS3231 value, others map it to the Unix definition.

1 Like

I often use RTClib which is well supported and maintained.
https://www.arduino.cc/reference/en/libraries/rtclib/

The previously mentioned Christensen library is also very good, and integrates better with the time library unless you write your own synch provider function for RTClib.

I'll probably give that a try. The one that I am using came with my Elegoo bundle on disk. However, I've noticed that some of the example sketches don't work, and it is not just me there are other posts about it.

Thanks for the advice.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.