Time (RTC clock)
Working with time using Blynk API
Blynk.sendInternal("rtc", "sync"); //request current local time for deviceBLYNK_CONNECTED() { //When device is connected to server...
Blynk.sendInternal("rtc", "sync"); //request current local time for device
}BLYNK_WRITE(InternalPinRTC) { //check the value of InternalPinRTC
long t = param.asLong(); //store time in t variable
Serial.print("Unix time: ");
Serial.print(t); //prints time in UNIX format to Serial Monitor
Serial.println();
}Last updated
Was this helpful?

