I downloaded the sample code following the instruction of ESP32/ESP8266 IoT Cloud (IoT Cloud - Arduino Forum) to a Heltec WiFi Kit 32 board. The sketch is compiled and loaded successfully via Arduino IDE 2.3.2. The board is connected to the WiFi network correctly.
I received following error message:
ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8884 Error: -1
I delete the device, Thing and dashboard. Then create a new one. This time, the device is able to connect online. But it is intermittent,
Not sure what causes it to connect or disconnect. Is there a tule how often should I execute the ArduinoCloud.update() function?