ArduinoCloud.begin causing resets to the board MKR WiFi 1010

Hello everyone,

I would like to point out that I am not an expert in programming and I need help solving an issue that occurs when I initialize the Arduino IoT Cloud library.

I am connecting my MKR WiFi 1010 board to the Arduino Cloud to remotely modify a parameter. When I insert the line:

ArduinoCloud.begin(ArduinoIoTPreferredConnection);

the board resets approximately every 10 seconds. Without the above line, I cannot connect to the Cloud, but the rest of the program works without problems.

Has this ever happened to you? Any suggestions?

Thank you, Marco

Hi @biomarco. It sounds like the effect of the watchdog timer in the ArduinoIoTCloud library:

https://docs.arduino.cc/arduino-cloud/cloud-interface/sketches/#watchdog-timer-wdt

You must call the ArduinoCloud.update() function frequently in your sketch, both to avoid the watchdog timer expiring as well as for the correct functionality of the Arduino Cloud Thing.

1 Like

Grazie ptillisch,

... it's exactly like that!

Since the data on my variable increases or decreases very slowly, I was thinking of calling the ArduinoCloud.update() routine every minute (or every 5 minutes). However, this causes a timeout issue, triggering the watchdog. Not wanting to disable the watchdog, I solved it by calling ArduinoCloud.update() every 5 seconds.

I generate a "useless" data flow and notice slight delays during updates, but I accept them.

Thank you.

You are welcome. I'm glad it is working now.

It is possible to disable the watchdog timer feature if it truly is not appropriate for your application. There are instructions at the link I provided in my previous reply.

But keep in mind that the watchdog timer is intended to allow your Thing to automatically recover from an emergency situation where for some reason the program hangs. This could be quite useful in a situation where you don't have convenient physical access to the device to manually reset the board.

Regards,
Per

Thank you again.

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