Need 24 hour DS3231 RTC library for the UNO R4 Minima

Hi

I am looking for a library for the DS3231 that supports 24 hour time and works on the UNO R4 Minima.

I have installed countless libraries but they either don't have a 24 hour setting, don't compile on the Minima, or use up a ton of memory with dates and times in byte format [and all the code that needs to go with formatting that].

I don't need anything fancy. Just set date and time [using integers], get date and time, and do so in 24 hour format.

Thanks

Curly Bracket

I simply look and if it is showing PM I add 12 to the hours. The minutes, seconds etc are the same.

Thanks but that is not really the solution I was looking for. My data logger code does this a few times a second and between the timing impact and the extra lines of code I am trying to avoid this.

Can I not just set it to 24 hour mode? That would seem to be a pretty basic requirement of the library.

Thanks

Curly Bracket

I've used RTClib successfully on the R4 with a DS3231. Like every other RTC library I can think of, it returns hours in 24 hour format. What's your issue with it?

I don't have any problem compiling for the Time library along with the DS3232RTC library.

It seems to be working in 24 hour mode now using:

#include "RTClib.h"
RTC_DS3231 rtc;

I suspect going through all those libraries and examples it got set to 12 hour at some point.

I don't see any explicit command in the current code setting it to 24 hour so that is my best guess.

Curly Bracket

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