Hi!
I am trying to add an ESP32 board to the Arduino Cloud for the first time. Everything works fine through the IDE (uploading the code) but when I try to upload the same code through the Cloud I get this error:
Hi @matio81. Due to the combination of two bugs (espressif/arduino-esp32#8744, espressif/arduino-esp32#10271) in the 3rd party "esp32" boards platform, it is not possible to upload to the specific ESP32 board you are using via the serial port when using Arduino Cloud.
I recommend using Arduino IDE to develop sketches for this particular board. Those bugs have already been fixed in the platform, so you won't have any problem when using the recent versions of the platform with Arduino IDE, but the fixes have not yet propagated to Arduino Cloud and it might be some time before that happens.
Note that, although it will be most convenient to use the Arduino Cloud web interface for the initial setup of the Arduino CloudThing, after that you can use Arduino IDE for all further development and serial port uploading of the sketch. You will see newly created Thing sketches under the "Cloud Sketchbook" tab of the IDE's "SKETCHBOOK" panel after you click the "Sync" icon at the bottom right corner of the panel.
Arduino IDE has Arduino Cloud integration, which provides convenient access to the sketches from your Arduino Cloud account.
I'll provide instructions you can follow to set up Arduino IDE and upload your sketch:
Connect Arduino IDE to your Arduino Cloud account by following the instructions here
You should now see the list of sketches from your Arduino Cloud account in the "SKETCHBOOK" panel of the IDE window. Click on the sketch you would like to upload to your board.
Click the cloud with downward pointing arrow icon ("Pull Sketch") that appears to the right of the sketch name.
A "Synchronizing sketchbook, pulling ..." process will start.
Wait for the synchronization process to finish, as indicated by the appearance of a notification at the bottom right corner of the IDE window:
Done pulling ...
Double click on the sketch name in the "SKETCHBOOK" panel.
The sketch will open in a new Arduino IDE window.
Select the appropriate board from the IDE's Tools > Board > esp32 menu.
Select the appropriate port from the IDE's Tools > Port menu.
Select Sketch > Upload from the Arduino IDE menus.
The sketch should now upload successfully to the board.
It is possible to use Arduino Cloud Editor to make Arduino Cloud IoT OTA uploads to the board. This will only be possible after you have uploaded a functional Thing sketch to the board via the USB port (the Thing sketch program contains the code that connects the board to the Arduino Cloud servers and causes it to be recognized as an OTA port to which you can upload).
Please let me know if you have any questions or problems while following those instructions.