Get the RTC module RV-1805 (Qwiic) in 24h mode

Hii there,

I don´t understand how to get the RV-1805 RTC Qwiic module in 24 h mode.

In the examples of the Hookup Guide https://learn.sparkfun.com/tutorials/qw … okup-guide theres only the 12h mode used as standard.

I see that there is an implemented function called " void set24Hour(); — Sets the RTC to 24 hour mode. "

and that I have to call that function in void setup ( )

But do I have to place the funktion in the code where I upload the correct compiler time to the RTC,

or do I have to place the function in the print time example?

I already tried different ways but without any success.

A code example would be very useful.

Thank you in advance and all the best.

Your Toby

Hi Toby,

All you need to do to set the RV-1805 to 24-hour mode with our library is to include the “rtc.set24Hour();” function in your void setup() like this:

void setup() {

  Wire.begin();

  Serial.begin(9600);
  Serial.println("Read Time from RTC Example");
  
    
  if (rtc.begin() == false) {
    Serial.println("Something went wrong, check wiring");
  }

  Serial.println("RTC online!");
  rtc.set24Hour();
}

Works perfect for now!

Thank you for your help!

best wishes

Toby