Arduino IOT cloud and Arduino IDE?

Hi,

I have an Arduino nano ESP32. Like another poster six months ago, I would like to use the cloud-functionality for accessing my devices from anywhere over internet while I want to do all the developing locally on the locally started Arduino-IDE.

I did read the other answers but they are out of date. Any chance anyone can guide me here:

  1. Is this possible?

  2. [Also: what other ways might I have to get data off the Arduino using WiFi, i.e. without IoT Arduino Cloud back end?]

If anyone can get me to the right resources so I can read up, this would be very helpful indeed.

Thanks all!

Michael

Hi @michaelwillems

Yes. The only parts you can't do via Arduino IDE is:

  • Setting up a board as an Arduino IoT Cloud Device
  • Configuring the Arduino IoT Cloud Thing
  • Configuring the Arduino IoT Cloud dashboard

But these tasks are accomplished very quickly and infrequently. Once you have done that, you can do all further development, compilation, uploading, and debugging on the Thing sketch using Arduino IDE.

Downloading Thing Sketch from Arduino Cloud

Arduino IDE Cloud Sketchbook

Once you have set up a Device and Thing as usual (following this procedure), you only need to download the generated Thing sketch skeleton from Arduino Cloud so that you can open it in Arduino IDE. The most convenient way to do that is using the "Cloud Sketchbook" feature of Arduino IDE 2.x:

Alternative Technique

If you prefer to use Arduino IDE 1.x or some other development tool that doesn't have the Cloud Sketchbook capability, there is an alternative. I'll provide instructions for that:

  1. Open your "Thing" in Arduino IoT Cloud.
  2. Select the "Sketch" tab.
  3. Click the </> Open full editor button.
  4. Wait for the sketch to open in Arduino Web Editor (AKA "full editor").
  5. Click the ••• button to the right of the board selector.
  6. Select "Download Sketch" from the menu.
  7. Wait for download to finish.
  8. Unzip the downloaded file.
  9. Open the .ino file from the unzipped folder in Arduino IDE.

Network Configuration

Note that, to help protect your private information, the network credentials you set on Arduino IoT Cloud are not contained in the "Thing" sketch when you download it using the procedure I described above. After opening the sketch in Arduino IDE, select the "arduino_secrets.h" and set the network credentials there.

For example:

#define SECRET_SSID "MY_SSID"
#define SECRET_PASS "correcthorsebatterystaple"
#define SECRET_DEVICE_KEY "mysecretkey"

Arduino Cloud CLI

In some advanced use cases, it might be desirable to be able to even configure Devices and Things using a local tool instead of via the convenient Arduino Cloud web interface. Arduino provides a command line tool for that purpose named "Arduino Cloud CLI" . You can learn about it from this tutorial:

Please note that this is a complex tool for advanced users. I recommend using [the Arduino IoT Cloud web interface](Arduino IoT Cloud) unless you have a specific reason to prefer an alternative procedure.

2 Likes

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