Board iot e cloud arduino problem restart board

Hello everyone, I'm having problems when I run the program to connect to the arduino cloud, at first I thought it was the boards (I made some wiring errors), then today I received a new mkr1010 and with surprise without connecting it I loaded my program from the cloud, same problem. I modified the program to understand if there was something that sent in reboot, nothing, I just loaded the program to connect to the cloud with a variable, same problem. The board keep restarting. When I load an empty schetch from arduino ide everything is ok

Hi @corso_shiba. Please post your full sketch.

I'll provide instructions you can follow to do that:

  1. Click the following link to open the list of your Arduino Cloud Things in the web browser:
    https://app.arduino.cc/things
  2. Click on the Thing you are referring to in your post.
    The Thing's "Setup" page will open.
  3. Click the "Sketch" tab at the top of the page.
    The Thing's "Sketch" page will open.
  4. Click the "Auto indent" button on the toolbar:

    This is done to make the code easier for us to read.
  5. Click on the editor panel of the window.
  6. Press the Ctrl+A keyboard shortcut (Command+A for macOS users).
    This will select all the sketch code.
  7. Press the Ctrl+C keyboard shortcut (Command+C for macOS users).
    This will copy the selected code to the clipboard.
  8. In a forum reply here, click on the reply field.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code tags icon on toolbar
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the compilation output into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to post the output.

If your code uses a library that you imported to your Arduino Cloud account (as opposed to the standard libraries that are pre-installed), please post a link to where you downloaded that imported library from.

Hi, thanks for the reply, here is my code, which is not what I wanted to do, because in the search for the problem I deleted the variables and commented on the code, then I deleted it completely.
I'll do it again, but what I'm uploading now is this code.
I did one more test, loading this code from Arduino IDE, connected to the pc it never disconnects.

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Then I loaded this from Arduino Cloud, the problem came back, the board disconnects.
it seems that there is a problem between on the usb communication line--> Arduino ---> WiFi?

/*
  Sketch generated by the Arduino IoT Cloud Thing "Untitled 2"
  https://create.arduino.cc/cloud/things/d3df9133-4637-41ca-bbcf-a5e81faa3306

  Arduino IoT Cloud Variables description

  The following variables are automatically generated and updated when changes are made to the Thing

  int prova;

  Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
  which are called when their values are changed from the Dashboard.
  These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"

void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500);

  // Defined in thingProperties.h
  initProperties();

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

  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
  */
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  // Your code here


}


/*
  Since Prova is READ_WRITE variable, onProvaChange() is
  executed every time a new value is received from IoT Cloud.
*/
void onProvaChange()  {
  // Add your code here to act upon Prova change
}

You were very wise to check whether the problem also occurs even with the "bare minimum" sketch, as well as with a bare minimum Thing sketch.

This eliminates all the code of your full project sketch as the potential cause of the bad behavior.

My hypothesis is that this might be a power problem. The Wi-Fi radio on the board can draw a significant amount of current momentarily. If the power supply to the board can't provide the necessary current, that can result in a reset.

In this case where you are powering the board from your computer via a USB cable, it might be caused by using a very low quality (super thin wires), defective, or damaged cable. Try using a different cable. Make sure the cable is fully inserted into the socket on the computer and the board.

Do you have any external wiring, shields, modules, breadboard, etc. connected to the MKR WiFi 1010 board? This could also be a factor.

Power is a problem that examined, the behavior is similar to this cause, unfortunately it is not so. I used an external power supply, it doesn't solve the problem.

Before your answer, I tried this using IDE:
-mkr1010_A (new, never connected a harware)

  • schetch Wifi library -- scan WiFi
  • The card works, it doesn't restart, it sees the networks present.

-mkr1010_B (used, I had problems with hardware connections)

  • schetch Wifi library -- scan WiFi
  • The card works, it doesn't restart, it sees the networks present.

-mkr1010_A (new, never connected a harware)

  • schetch Host a Web Server on the MKR WiFi 1010
  • The card is working, not restarting, it is connected to the network.

now I'm proceeding with my ESP32 web server project, I'm using the same cables,
being under development I am still connected to usbPC-->ESP32, the WiFi module of ESP is hot, but it has no power problems.
I was unable to try ESP32 with arduino Cloud because the board is offline.

Since I started having problems, I haven't plugged anything in, they're like they come as soon as they come with their protective sponge.

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