ArduinoIoTCloud - update() (TCP)

Description

Note: for LoRa devices, the update() function is implemented differently. See

Responsible for updating the IoT Cloud connection.

  • First it feeds a watchdog timer, making sure it is not stuck anywhere,
  • then sends variable updates to the IoT Cloud (via MQTT client)
  • finally, it checks for new data from the IoT Cloud (via the MQTT client)

Any IoT Cloud sketch needs to continuously call the update() function, as it will otherwise time out and reset. The update() is by default placed inside of the loop().

Note: do not use the delay() function in the sketch, as the watchdog timer will cause the board to reset and attempt to reconnect.

Syntax

ArduinoCloud.update()

Parameters

None.

Returns

Nothing.