Clock in time picker/schedular runs too fast

Hi!

When using the code below the clock in the Time Picker goes too fast. Approximately 110 seconds per hour. With this inaccuracy the schedular is more or less useless. To make it synch I simply push the resetbutton but the clock continues to go too fast. There must be something fundamental i've missed in the code. Does anyone know?

#include "thingProperties.h"

void setup() {
  Serial.begin(9600);
  delay(1500); 
  initProperties();
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  if (ArduinoCloud.connected()) {
    timeTest = ArduinoCloud.getLocalTime();
  
  }
}

Hi @duveskog which board are you using?

UNO R4 WiFi.

@duveskog take a look at this thread Arduino RTC does not stay in sync despite use of ArduinoCloud.getLocalTime(); - #7 by pennam

you can try the same to keep RTC in sync.

1 Like

Thank you so much! It works perfectly!

1 Like

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