Error compilation for Arduino IoT Cloud

Error is
#pragma message "No RTC available on this architecture - ArduinoIoTCloud will not keep track of local change timestamps ."

When I use web editor all fine, but if use Arduino IDE then faced this problem, microcontroller used is ESP32. Why and how to solve it? Thank for your help

#include "arduino_secrets.h"
#include "thingProperties.h"
#include "DHT.h"

#define DHTPin 15
#define DHTType DHT11

DHT dht(DHTPin, DHTType);

void setup()
{
  Serial.begin(115200);
  dht.begin();

  initProperties();                                   // Defined in thingProperties.h

  ArduinoCloud.begin(ArduinoIoTPreferredConnection);  // Connect to Arduino IoT Cloud

  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  temperature = dht.readTemperature();
  humidity = dht.readHumidity();

  String Print = "Temperature : " + String(temperature) + "C\nHumidity : " + String(humidity) + "%";
  Serial.println(Print);

}

Here is my code...

Well from looking at the well formatted code that you posted in code tags I can tell you that the line with the error is...

1 Like

When you change or post NEW code post the changes at the end of the thread, don't go back and edit previous posts. It breaks the continuity.

Did you happen to read,

It would be best to read that so that we don't spend the next 25 postings teaching you how to do the thing. Anyways. Good luck, I've delivered my lesson for this thread. I'm out.

Very sorry about it, I am new at here. Thank for your information.

Hi @guangyang this is not an error, it is just a message. On ESP boards there is no builtin support for RTC.

I've opened a PR that should address this: ESP TimeService: remove delays introduced by NTP requests by pennam · Pull Request #340 · arduino-libraries/ArduinoIoTCloud · GitHub

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