diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/3rd-party-support.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/3rd-party-support.png deleted file mode 100644 index 1eefcc9df9..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/3rd-party-support.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/dashboard1.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/dashboard1.png deleted file mode 100644 index 445cb0146e..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/dashboard1.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/endimg.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/endimg.png deleted file mode 100644 index fda897fa11..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/endimg.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-access.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-access.png deleted file mode 100644 index 6638be9b51..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-access.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-dashboard-link.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-dashboard-link.png deleted file mode 100644 index b86f1c3cd0..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-dashboard-link.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-dashboard-widgets.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-dashboard-widgets.png deleted file mode 100644 index d29f8cf4de..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-dashboard-widgets.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-dashboards.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-dashboards.png deleted file mode 100644 index c16fc8cb17..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-dashboards.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-device-attach.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-device-attach.png deleted file mode 100644 index 5ec3ac4047..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-device-attach.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-device-overview.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-device-overview.png deleted file mode 100644 index 74a6d2d176..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-device-overview.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-serial-monitor.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-serial-monitor.png deleted file mode 100644 index 763d200b81..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-serial-monitor.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-thing-editor.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-thing-editor.png deleted file mode 100644 index ad0a238a44..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-thing-editor.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-thing-network.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-thing-network.png deleted file mode 100644 index 57568f9ab1..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-thing-network.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-thing-overview.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-thing-overview.png deleted file mode 100644 index f21b7e966b..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-thing-overview.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-thing-variables.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-thing-variables.png deleted file mode 100644 index 22f0491741..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/gs-thing-variables.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/setup.png b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/setup.png deleted file mode 100644 index 9734ec277e..0000000000 Binary files a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/setup.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/iot-cloud-getting-started.md b/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/iot-cloud-getting-started.md deleted file mode 100644 index 1ba8414f41..0000000000 --- a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/iot-cloud-getting-started.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -title: "Getting Started With the Arduino IoT Cloud" -compatible-products: [mkr-1000-wifi, mkr-wifi-1010, nano-33-iot, nano-rp2040-connect] -difficulty: beginner -description: 'The Arduino IoT Cloud is a online platform that makes it easy for you to create, deploy and monitor IoT projects.' -tags: - - IoT Cloud -author: 'Karl Söderby' -featuredImage: 'cloud' ---- - -## Introduction - -Connected devices around the world are increasing by billions every year. The [Arduino IoT Cloud](https://create.arduino.cc/iot/things) is a platform that allows **anyone** to create IoT projects, with a user friendly interface, and an all in one solution for **configuration, writing code, uploading** and **visualization.** - -In this article, we will take a look at some different components of the Arduino IoT Cloud, and provide a general overview. - -But if you’re itching to get started and explore the Arduino IoT Cloud yourself, that is also perfectly fine! You can always come back here for more information! - -- Go to Arduino IoT Cloud - -### IoT Cloud Documentation - -The Arduino IoT Cloud has several pages of documentation available. Below you will find a list of some popular pages: - -- To find **all tutorials & articles**, visit the [Arduino IoT Cloud Documentation page](/cloud/iot-cloud). - -- For a **technical overview, list of features,** and **API guide**, visit the [Arduino IoT Cloud Cheat Sheet](/cloud/iot-cloud/tutorials/technical-reference). - -- For **API & SDK Documentation**, visit the developer reference at [Arduino IoT Cloud API](https://www.arduino.cc/reference/en/iot/api/). - -### Features - -Below is a list of Arduino IoT Cloud features. - -- [**Data Monitoring**](/cloud/iot-cloud/tutorials/cloud-environmental-data) - learn how to easily monitor your Arduino's sensor values through a dashboard. -- [**Variable Synchronisation**](https://docs.arduino.cc/cloud/iot-cloud/tutorials/device-to-device) - variable synchronisation allows you to sync variables across devices, enabling communication between devices with minimal coding. -- [**Scheduler**](https://docs.arduino.cc/cloud/iot-cloud/tutorials/cloud-scheduler) - schedule jobs to go on/off for a specific amount of time (seconds, minutes, hours). -- [**Over-The-Air (OTA) Uploads**](/cloud/iot-cloud/tutorials/ota-getting-started) - upload code to devices not connected to your computer. -- [**Webhooks**](https://docs.arduino.cc/cloud/iot-cloud/tutorials/webhooks) - integrate your project with another service, such as IFTTT. -- [**Amazon Alexa Support**](/cloud/iot-cloud/tutorials/alexa-mkr-rgb-shield) - make your project voice controlled with the Amazon Alexa integration. -- [**Dashboard Sharing**](https://docs.arduino.cc/cloud/iot-cloud/tutorials/sharing-dashboards) - share your data with other people around the world. - -## Compatible Hardware - -To use the Arduino IoT Cloud, a **cloud compatible board** is required. You can choose between using an official Arduino board, or a board based on the ESP32 / ESP8266 microcontroller. The Arduino IoT Cloud currently supports connection via Wi-Fi, LoRaWAN® (via The Things Network) and mobile networks. - -***All cloud-compatible Arduino boards come with a hardware secure element (such as the [ECC508](https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/20005928A.pdf) cryptochip), where you can store your security keys.*** - -### Wi-Fi - -***Official Arduino boards only supports the 2.4GHz frequency band for transmitting data.*** - -The following boards connect to the Arduino IoT Cloud via Wi-Fi. - -- [MKR WiFi 1010](https://store.arduino.cc/arduino-mkr-wifi-1010) -- [Nano RP2040 Connect](https://store.arduino.cc/nano-rp2040-connect) -- [Nano 33 IoT](https://store.arduino.cc/arduino-nano-33-iot) -- [GIGA R1 WiFi](https://store.arduino.cc/products/giga-r1-wifi) -- [Portenta H7](https://store.arduino.cc/portenta-h7) -- [Portenta H7 Lite Connected](https://store.arduino.cc/products/portenta-h7-lite-connected) -- [Portenta Machine Control](https://store.arduino.cc/products/arduino-portenta-machine-control) -- [Portenta X8](https://store.arduino.cc/products/portenta-x8) -- [Nicla Vision](https://store.arduino.cc/products/nicla-vision) -- [Opta](https://docs.arduino.cc/hardware/opta). -- [UNO R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi) - -Connection via Wi-Fi is an easy alternative, and your credentials can safely be entered during the configuration of a project. This type of connection is most suitable for low-range projects, where you connect your board to the cloud via your home/work/school router. - -### LoRaWAN® - -The following boards connect to the Arduino IoT Cloud via [The Things Stack](https://www.thethingsindustries.com/stack/), a LoRaWAN® Network Server connected to thousands of public LoRa® gateways. - -- [MKR WAN 1300](https://store.arduino.cc/arduino-mkr-wan-1300-lora-connectivity-1414) -- [MKR WAN 1310](https://store.arduino.cc/mkr-wan-1310) - -Connection via LoRaWAN® is recommended for low-power projects in both remote and urban areas, where Wi-Fi or other popular connectivity types are not available. The MKR WAN 1300/1310 boards are equipped with a LoRa radio module and has a slot for an antenna. With the right low-power configuration, the board can send data to the cloud for months on a single battery. - -***To learn more about setting up LoRaWAN® devices, visit the [Configuring LoRaWAN® devices in the Arduino Cloud](/cloud/iot-cloud/tutorials/cloud-lora-getting-started) guide.*** - -### GSM / NB-IoT Boards - -The MKR GSM 1400 and MKR NB 1500 require a **SIM card** to connect to the cloud, as they communicate over the mobile networks. - -- [MKR GSM 1400](https://store.arduino.cc/arduino-mkr-gsm-1400) -- [MKR NB 1500](https://store.arduino.cc/arduino-mkr-nb-1500-1413) - -Connection through mobile networks can be considered in remote areas where there's no Wi-Fi, or in mobile projects (such as cargo tracking). - -***For more information, visit the [Arduino SIM page](https://store.arduino.cc/digital/sim).*** - -***Note that a secured connection is a memory intense operation, so there's not a lot of memory for the user application (e.g. around 2.6 kB on the MKR GSM 1400). Using a lot of IoT Cloud variables may cause the sketch to run out of memory on boards which don't offload the SSL stack and make it crash.*** - -### ESP32 / ESP8266 - -The Arduino IoT Cloud supports a wide range of third party boards based on the ESP32 and ESP8266 microcontrollers with support for Wi-Fi. To set them up, simply choose the **third party option** in the device setup. - -![Configuring third party boards.](assets/3rd-party-support.png) - -***To learn more about ESP32/ESP8266 support and how to set it up, visit the [Connecting ESP32 & ESP8266 to Arduino Cloud IoT](/cloud/iot-cloud/tutorials/esp-32-cloud) guide.*** - -### Ethernet - -The Arduino IoT Cloud supports connection via Ethernet on a number of devices. The options to connect via Ethernet are the following: -- Connect with the [Portenta H7](https://store.arduino.cc/products/portenta-h7) in combination with an Ethernet compatible carrier/shield (see below). -- Connect with the [Opta](https://docs.arduino.cc/hardware/opta). - -To connect with the **Portenta H7** board, you will need one of the following shields/carriers: -- [Portenta Vision Shield Ethernet](https://store.arduino.cc/products/arduino-portenta-vision-shield-ethernet) -- [Portenta Machine Control](https://store.arduino.cc/portenta-machine-control) - -To enable communication via Ethernet with the Portenta H7, while configuring your device, you need to select the "Ethernet" option. If your device is already configured as a Wi-Fi device, you need to remove it before configuring it to Ethernet communication. - -![Choose the Ethernet option.](assets/ethernet.png) - -***Please note that older hardware such as the [Ethernet Shield Rev2](https://store.arduino.cc/products/arduino-ethernet-shield-2) and [MKR ETH Shield](https://store.arduino.cc/products/arduino-mkr-eth-shield) are currently not supported by the Arduino IoT Cloud.*** - -## Support - -If you have any problems with the Arduino IoT Cloud, you can browse through common troubleshooting issues and find information on different features in the **Arduino Help Center**. If you don’t find the answer you are looking for, we are always happy to help you with any question regarding our products! - -Go to Arduino Help Center - -## A Walk Through the Configuration - -![Setting up the Arduino IoT Cloud.](assets/setup.png) - -Setting up the Arduino IoT Cloud and accessing the different features available involves a few simple steps. So let’s take a look at how to go from start to finish! - -### 1. Creating an Arduino Account - -To starting using the Arduino IoT cloud, we first need to [log in or sign up to Arduino](https://create.arduino.cc/iot/things). - -#### 2. Go to the Arduino IoT Cloud - -After we have signed up, you can access the Arduino IoT Cloud from any page on [arduino.cc](https://www.arduino.cc/) by clicking on the four dots menu in the top right corner. You can also [go directly to the Arduino IoT Cloud](https://create.arduino.cc/iot/). - -![Navigating to the cloud.](assets/gs-access.png) - -### 3. Creating a Thing - -The journey always begin by creating a new **Thing**. In the Thing overview, we can choose what device to use, what Wi-Fi network we want to connect to, and create variables that we can monitor and control. This is the main configuration space, where all changes we make are automatically generated into a **special sketch file**. - -![The Thing overview.](assets/gs-thing-overview.png) - -### 4. Configuring a Device - -Devices can easily be added and linked to a Thing. The Arduino IoT Cloud requires your computer to have the [Arduino Create Agent installed](https://create.arduino.cc/getting-started/plugin/welcome). The configuration process is quick and easy, and can be done by clicking on the **“Select device”** button in the Thing overview. Here, we can choose from any board that has been configured, or select the **“Configure new device”** option. - -![Configuring a device.](assets/gs-device-attach.png) - -We can also get a complete overview of our devices by clicking the **“Devices"** tab at the top of the Arduino IoT Cloud interface. Here we can manage and add new devices. - -![The device tab.](assets/gs-device-overview.png) - -### 5. Creating Variables - -The variables we create are automatically generated into a sketch file. There are several data types we can choose from, such as **int, float, boolean, long, char**. There’s also special variables, such as **Temperature, Velocity, Luminance** that can be used. When clicking on the **“Add variable”** button, we can choose name, data type, update setting and interaction mode. - -![Creating variables.](assets/gs-thing-variables.png) - -### 6. Connecting to a Network - -To connect to a Wi-Fi network, simply click the **“Configure”** button in the network section. Enter the credentials and click **“Save”**. This information is also generated into your sketch file! - -![Entering network credentials.](assets/gs-thing-network.png) - -### 7. Editing the Sketch - -Now that we have configured variables, devices and network settings, we can get to programming our devices! - -An automatically generated sketch file can be found in the **“Sketch”** tab. It has the same structure as a typical `.ino` file, but with some additional code to make the connection to your network and to the cloud. - -A sketch that, for example, reads an analog sensor, and use the **cloud variable** to store it. When the sketch has been uploaded, it will work as a regular sketch, but it will also update the cloud variables that we use! - -Additionally, each time we create a variable that has the **Read & Write** permission enabled, a function is also generated, at the bottom of your sketch file. Each time this variable changes, it will execute the code within this function! This means that we can leave most of the code out of the **loop()** and only run code when needed. - -To upload the program to our board, simply click the **"Upload"** button. - -![Editing a sketch in the cloud editor.](assets/gs-thing-editor.png) - -The editor also has a **Serial Monitor Tool**, which can be opened by clicking the magnifying glass in the toolbar. Here you can view information regarding your connection, or commands printed via `Serial.print()`. - -![The Serial Monitor Tool.](assets/gs-serial-monitor.png) - -After we have successfully uploaded the code, we can open the **“Serial Monitor”** tab to view information regarding our connection. If it is successful, it will print **“connected to network_name”** and **“connected to cloud”**. If it fails to connect, it will print the errors here as well. - -***The cloud editor is a mirrored "minimal" version of the Web Editor. Any changes you make will also be reflected in the Web Editor, which is more suitable for developing more advanced sketches.*** - -#### Over the Air Uploads - -Did you know that the Arduino IoT Cloud supports over the air uploads? When you've uploaded a sketch to your board once, it will become available for you to upload a new sketch to the board without connecting it to your computer! - -***Over the Air uploads require an Entry plan to the Arduino IoT Cloud*** - -To use this feature, make sure the board has power. If your board is already connected to the IoT Cloud, you will be able to upload to it over the air. Navigate to the Things sketch tab in the Arduino IoT Cloud interface, and you should see it being discovered just as if it was connected via USB. - -### 8. Creating a Dashboard - -Now that we have configured the device & network, created variables, completed the sketch and successfully uploaded the code, we can move on to the fun part: **creating dashboards!** - -![Visualize your data.](assets/dashboard1.png) - -Dashboards are visual user interface for interacting with your boards over the cloud, and we can setup many different setups depending on what your IoT project needs. We can access our dashboards by clicking on the **“Dashboards”** tab at the top of the Arduino IoT Cloud interface, where we can create new dashboards, and see a list of dashboards created for other Things. - -![Navigating to dashboards.](assets/gs-dashboards.png) - -If we click on **“Create new dashboard”**, we enter a dashboard editor. Here, we can create something called **widgets**. Widgets are the visual representation of our variables we create, and there are many different to choose from. Below is an example using several types of widgets. - -![The different widgets available.](assets/gs-dashboard-widgets.png) - -When we create widgets, we also need to **link them to our variables**. This is done by clicking on a widget we create, select a Thing, and select a variable that we want to link. Once it is linked, we can either interact with it, for example a button, or we can monitor a value from a sensor. As long as our board is connected to the cloud, the values will update! - -Let's say we have a **temperature widget** that we want to link to the **temperature** variable inside the **Cloud project** thing. - -![Linking a variable to a widget.](assets/gs-dashboard-link.png) - -***Note that not all widgets and variables are compatible. A switch and an integer can for example not be linked, and will not be an option while setting up your dashboard.*** - -We can also have several things running at once, depending on your Arduino IoT Cloud plan, which we can include in the same dashboard. This is a great feature for tracking multiple boards in for example a larger sensor network, where boards can be connected to different networks around the world, but be monitored from the same dashboard. - -## Congratulations - -![What will you build?](assets/endimg.png) - -You are just a few easy steps from deploying your very own IoT project. Having a project connected to the Arduino IoT Cloud opens up many possibilities, such as tracking data in real time, triggering remote devices and building wireless systems. - -What will you create? - -Start your IoT journey - - -### More tutorials - -You can find more tutorials in the [Arduino IoT Cloud documentation page](/arduino-cloud/). diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/3rd-party-support.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/3rd-party-support.png deleted file mode 100644 index 5bf5639282..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/3rd-party-support.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/add-widget-manually.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/add-widget-manually.png deleted file mode 100644 index f39293293d..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/add-widget-manually.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/adding-a-device.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/adding-a-device.png deleted file mode 100644 index 5dcb413e62..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/adding-a-device.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/adding-a-thing.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/adding-a-thing.png deleted file mode 100644 index fef8cbb295..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/adding-a-thing.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/adding-a-variable.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/adding-a-variable.png deleted file mode 100644 index ee3d65e023..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/adding-a-variable.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/choosing-a-device.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/choosing-a-device.png deleted file mode 100644 index c7a4d5d74e..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/choosing-a-device.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/cloud-widgets.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/cloud-widgets.png deleted file mode 100644 index cd82fed152..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/cloud-widgets.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/configuration-completed.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/configuration-completed.png deleted file mode 100644 index d5085943b7..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/configuration-completed.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/configuring-network.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/configuring-network.png deleted file mode 100644 index 3d56a5647c..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/configuring-network.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/create-a-dashboard.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/create-a-dashboard.png deleted file mode 100644 index 064080c1e9..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/create-a-dashboard.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/create-an-account.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/create-an-account.png deleted file mode 100644 index 99ee5aaa93..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/create-an-account.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/create-widget-from-thing.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/create-widget-from-thing.png deleted file mode 100644 index 905c50abde..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/create-widget-from-thing.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/device_OtA.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/device_OtA.png deleted file mode 100644 index 65e4454656..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/device_OtA.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/download-historical-data.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/download-historical-data.png deleted file mode 100644 index d2198365e3..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/download-historical-data.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/files-automated-sketch.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/files-automated-sketch.png deleted file mode 100644 index debbb93815..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/files-automated-sketch.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/iot-cloud-compatible-boards.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/iot-cloud-compatible-boards.png deleted file mode 100644 index a89b495a3c..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/iot-cloud-compatible-boards.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/navigating-to-devices.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/navigating-to-devices.png deleted file mode 100644 index 199bac606e..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/navigating-to-devices.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/open-with-web-editor.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/open-with-web-editor.png deleted file mode 100644 index 1752ada9a8..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/open-with-web-editor.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/ota_compatible_boards.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/ota_compatible_boards.png deleted file mode 100644 index 92e2ef4102..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/ota_compatible_boards.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/sharing-variables.gif b/content/arduino-cloud/01.getting-started/02.technical-reference/images/sharing-variables.gif deleted file mode 100644 index 43ddcc87fd..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/sharing-variables.gif and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/signing-in-to-account.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/signing-in-to-account.png deleted file mode 100644 index ab0bdfcb00..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/signing-in-to-account.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/sketch-tab.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/sketch-tab.png deleted file mode 100644 index aa89a5fd31..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/sketch-tab.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-01.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-01.png deleted file mode 100644 index 70e2e16d2e..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-01.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-02.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-02.png deleted file mode 100644 index 0f3ab39963..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-02.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-03.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-03.png deleted file mode 100644 index 9f6c01df8c..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-03.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-04.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-04.png deleted file mode 100644 index a40f8fceec..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-04.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-05.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-05.png deleted file mode 100644 index 643d4aafb4..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-05.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-06.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-06.png deleted file mode 100644 index e481a002b9..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-06.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-collected.png b/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-collected.png deleted file mode 100644 index 83ef99e705..0000000000 Binary files a/content/arduino-cloud/01.getting-started/02.technical-reference/images/widget-img-collected.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/02.technical-reference/iot-cloud-tech-ref.md b/content/arduino-cloud/01.getting-started/02.technical-reference/iot-cloud-tech-ref.md deleted file mode 100644 index 4eb77e414a..0000000000 --- a/content/arduino-cloud/01.getting-started/02.technical-reference/iot-cloud-tech-ref.md +++ /dev/null @@ -1,437 +0,0 @@ ---- -date: 'September 24, 2021, at 11:11 AM' -title: 'Arduino Cloud IoT Cheat Sheet' -description: 'Learn how to set up the Arduino Cloud IoT, get a quick overview of the compatible boards, the API, configuration, Things, variables and dashboards.' -author: 'Liam Aljundi' ---- - -[Arduino IoT Cloud](https://create.arduino.cc/iot/) is a service that allows you to configure, program and deploy your Arduino devices. It is an all-in-one solution for IoT development, where you can build visual dashboards to monitor and control your devices, integrate with other services and much more. - -This article summarizes the use of the Arduino Cloud IoT, and includes information regarding requirements, installation, API and general usage of the platform. - -## Compatible Hardware - -To use the Arduino IoT Cloud, a **cloud compatible board** is required. You can choose between using an official Arduino board, or a board based on the ESP32 / ESP8266 microcontroller. The Arduino IoT Cloud currently supports connection via Wi-Fi, LoRaWAN® (via The Things Network) and mobile networks. - -***All cloud-compatible Arduino boards come with a hardware secure element (such as the [ECC508](https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/20005928A.pdf) cryptochip), where you can store your security keys.*** - -### Wi-Fi - -***Official Arduino boards only supports the 2.4GHz frequency band for transmitting data.*** - -The following boards connect to the Arduino IoT Cloud via Wi-Fi. - -- [MKR WiFi 1010](https://store.arduino.cc/arduino-mkr-wifi-1010) -- [Nano RP2040 Connect](https://store.arduino.cc/nano-rp2040-connect) -- [Nano 33 IoT](https://store.arduino.cc/arduino-nano-33-iot) -- [GIGA R1 WiFi](https://store.arduino.cc/products/giga-r1-wifi) -- [Portenta H7](https://store.arduino.cc/portenta-h7) -- [Portenta H7 Lite Connected](https://store.arduino.cc/products/portenta-h7-lite-connected) -- [Portenta X8](https://store.arduino.cc/products/portenta-x8) -- [Nicla Vision](https://store.arduino.cc/products/nicla-vision) -- [UNO R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi) -- [Nano ESP32](https://store.arduino.cc/products/nano-esp32) - -Connection via Wi-Fi is an easy alternative, and your credentials can safely be entered during the configuration of a project. This type of connection is most suitable for low-range projects, where you connect your board to the cloud via your home/work/school router. - -### LoRaWAN® - -The following boards connect to the Arduino IoT Cloud via [The Things Stack](https://www.thethingsindustries.com/stack/), a LoRaWAN® Network Server connected to thousands of public LoRa® gateways. - -- [MKR WAN 1300](https://store.arduino.cc/arduino-mkr-wan-1300-lora-connectivity-1414) -- [MKR WAN 1310](https://store.arduino.cc/mkr-wan-1310) - -Connection via LoRaWAN® is recommended for low-power projects in both remote and urban areas, where Wi-Fi or other popular connectivity types are not available. The MKR WAN 1300/1310 boards are equipped with a LoRa radio module and has a slot for an antenna. With the right low-power configuration, the board can send data to the cloud for months on a single battery. - -***To learn more about setting up LoRaWAN® devices, visit the [Configuring LoRaWAN® devices in the Arduino Cloud](/cloud/iot-cloud/tutorials/cloud-lora-getting-started) guide.*** - -### GSM / NB-IoT Boards - -The MKR GSM 1400 and MKR NB 1500 require a **SIM card** to connect to the cloud, as they communicate over the mobile networks. - -- [MKR GSM 1400](https://store.arduino.cc/arduino-mkr-gsm-1400) -- [MKR NB 1500](https://store.arduino.cc/arduino-mkr-nb-1500-1413) - -Connection through mobile networks can be considered in remote areas where there's no Wi-Fi, or in mobile projects (such as cargo tracking). - -***For more information, visit the [Arduino SIM page](https://store.arduino.cc/digital/sim).*** - -### ESP32 / ESP8266 - -The Arduino IoT Cloud supports a wide range of third party boards based on the ESP32 and ESP8266 microcontrollers with support for Wi-Fi. To set them up, simply choose the **third party option** in the device setup. - -![Configuring third party boards.](images/3rd-party-support.png) - -***To learn more about ESP32/ESP8266 support and how to set it up, visit the [Connecting ESP32 & ESP8266 to Arduino Cloud IoT](/cloud/iot-cloud/tutorials/esp-32-cloud) guide.*** - -## Software Requirements - -### Create Agent - -The [Arduino Create Agent](https://github.com/arduino/arduino-create-agent) is a single binary that will appear on the menu bar and work in the background. It allows you to use the Arduino IoT Cloud and the Arduino Web Editor to seamlessly upload code to any board directly from the browser. - -Downloading and installing the Arduino Create Agent plugin can be simply done following [this quick and easy process](https://create.arduino.cc/getting-started/plugin/welcome). - -The full documentation of the [Arduino Create Agent is available here](https://github.com/arduino/arduino-create-agent#readme) for more advanced usage. - -### Arduino Account - -An Arduino account is needed to use all of the Arduino Cloud services including Arduino IoT Cloud and the Arduino Web Editor. [Follow this link to make an account](http://create.arduino.cc/iot). - -***In addition to IoT Cloud, the Arduino account provides access to the Arduino Web Editor which is the full online IDE. Arduino and non-Arduino boards can be programmed using the Arduino Web Editor without the need for installing board drivers or libraries.*** - -## Device configuration - -Configuration of the device to be used with the Arduino IoT Cloud is required **once for every new device**. - -Configuring a new device can be achieved following the steps below: - -1. [Sign in to the Arduino IoT Cloud](https://create.arduino.cc/iot). - -2. [Navigate to "Devices" on the top menu](https://create.arduino.cc/iot/devices). - -3. Connect an Arduino IoT Cloud **compatible device**. - -4. Click on the **"ADD DEVICE"** button. - -5. Select the correct device, either an **Arduino device** or a **third party device**. - -6. Wait until the **configuration is complete**. - -Once a device is successfully configured it appears in the **"Devices"** list and can be used to **create a thing**, or can be **linked to an existing thing**. - -The **Devices** page displays the name, status, and linked Things for each of the configured devices. Clicking on the device allows for **renaming** it, as well as accessing more information about the device such as its **ID number**, **type**, **FQBN**, **serial number**, **NINA firmware** version and the option to update it, **linked Thing**, **status**, latest activity and the date when the device was added. - -The **status** of the device indicates whether it's connected to the Arduino IoT Cloud (**online**), or not successfully connected (**offline**). - -A shortcut to add a device is also provided in **"Things" page** as explained in the next section. - -## Features - -Below you will find a list of features that are available in the Arduino IoT Cloud. - -### Uploading Over-The-Air (OTA) - -This feature allows for uploading sketches wirelessly to Arduino boards, without the need to connect the board physically. This feature is supported for the following boards: - -- [Arduino MKR WiFi 1010](https://store.arduino.cc/arduino-mkr-wifi-1010) -- [Arduino NANO 33 IoT](https://store.arduino.cc/arduino-nano-33-iot) -- [Arduino Nano RP2040 Connect](https://store.arduino.cc/products/arduino-nano-rp2040-connect-with-headers) -- [Portenta H7](https://store.arduino.cc/products/portenta-h7) -- [UNO R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi) -- [Nano ESP32](https://store.arduino.cc/products/nano-esp32) -- Cloud compatible ESP32 boards (see list below). - -#### Verified ESP32 Boards Supporting OTA - -The following ESP32 boards have been tested and verified to support OTA: - -- ESP32-S2-DevKitC -- NODEMCU-32-S2 -- WEMOS LOLIN D32 -- ESP32-S3-DevKitC -- WEMOS LOLIN D32 -- ESP32-CAM -- NodeMCU-32S -- Freenove ESP32 WROVER -- ESP32-DevKitC32E -- DOIT ESP32 DevKit v1 - -![Connecting the device with the OTA option](./images/device_OtA.png) - -In order to **enable over-the-air uploads**, an initial upload should be done in the traditional way via a cable connection using the IoT Cloud interface. After such initial upload, "Over-the-Air" will appear as an option whenever the board is connected to the cloud via its network connection. For more information about this topic, check out the [tutorial about uploading sketches Over-the-Air (OTA)](/arduino-cloud/features/ota-getting-started). - -### Variable Synchronisation - -This feature allows Arduino devices to communicate with each other by sharing variables, without writing a single line of code or spending time with radio modules and network protocols. - -![Sharing Variables](./images/sharing-variables.gif) - -Using this feature you can link variables of the same data type between **two or more cloud-enabled devices**, and Arduino IoT Cloud will automatically ensure any change to their value is propagated among all linked boards. -For example, one button could set three smart bulbs to the same color by just setting a variable on one device and reading it on the others. Or you could turn on a heater when temperature sensors in your room or outside in your weather station drop below a certain level. - -### Local Time - -To retrieve local time, use the `ArduinoCloud.getLocalTime()` method in your sketch. The value returned represents the current local time expressed as a Unix timestamp (i.e. seconds from the epoch), and it automatically takes your time zone settings and DST (Daylight Saving Time) into account. Time zone can be set in the Thing configuration page within the Arduino IoT Cloud platform. - -The returned timestamp can be displayed in a dashboard using a `CloudTime` variable and the [Time Picker widget](/arduino-cloud/getting-started/technical-reference#time-picker), or can be parsed with a third-party library such as [Time](https://www.arduino.cc/reference/en/libraries/time/) in case you want to show it on a display. - -```arduino -myTimeVariable = ArduinoCloud.getLocalTime() -``` - -***Note that when using a board equipped with a hardware Real-Time Clock (RTC) the [Arduino_IoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud) library will use it automatically, thus communicating with the RTC from within your sketch or other libraries is not recommended. You can use the `getLocalTime()` and `getInternalTime()` methods provided by Arduino_IoTCloud instead. -*** - -## Things - -In order to use your devices in IoT Cloud, you need to associate a Thing to each of them. A Thing is an abstract concept which holds the configuration of the variables and other settings, as well as the history of the data collected for the variables. - -Devices and things are distinct concepts in IoT Cloud so that you can easily swap the actual hardware without reconfiguring everything from scratch: just detach a thing from a device, and ressign it to another device. - -![Two ways to add a Thing](./images/adding-a-thing.png) - -The **Things page** can be accessed either by clicking on **"CREATE THING"** on the added device in the **"Device" page**, or by navigating to the **"Things"** tab in the top menu, then clicking on the **"CREATE THING"**. The first method links the device to the created Thing **automatically**, while the later method requires a **manual linking** of the device on the Things page. - - -The steps below can be used as guidance when **setting up a Thing**: - -1. **Attach a device** if not already attached. -2. **Add a variable**, or variables by clicking on the **"Add Variable"** button. -3. **Configure the network**, by entering the WiFi's name and password. -4. **Edit the sketch** in the **"Sketch"** tab. - -***You can learn more about Things in the [Getting Started with the Arduino IoT Cloud](https://docs.arduino.cc/cloud/iot-cloud/tutorials/iot-cloud-getting-started) guide.*** - -## Variables - -***Visit the main article on [Cloud Variables](/arduino-cloud/getting-started/cloud-variables) for a more detailed coverage.*** - -A thing can have one or more variables. A variable can be used for multiple purposes: - -* collect data over time in the cloud (sensor readings, status changes, log messages etc.) -* show data in real-time in a dashboard using the various available visual widgets -* receive changes originated from a dashboard or other linked devices - -When you configure a variable, Arduino IoT Cloud will handle all the communication and synchronization behind the scenes. Variables can be used directly just like any other variables in an Arduino sketch. - -When adding a variable the following values need to be determined: - -![Options for adding a variable](./images/adding-a-variable.png) - -1. A **Display Name**, which can any string name, preferably something that indicates the function of the variable. It can not include spaces and special characters, and it cannot start with a number. - -2. The **Type of Variable** corresponds to the data type of the variable and must be chosen from the provided list. See below for a full list of the available types. - - **Please note:** when a variable is added, it is automatically declared in the `thingProperties.h` file so you don't need to declare it yourself in the sketch. - -3. A **Declaration Name**, a unique name by which the variable will be called in the sketch. It can not include spaces and special characters, and it cannot start with a number. The display name chosen for the variable may be used here to avoid conflicts. - -4. The **Variable's Permission**, which can be either **Read & Write** or **Read Only**. A **Read & Write** variable can work both as **input and output**, the data can be sent from the device to the cloud and vice versa. A **Read Only** variable can only send data from the device to the cloud. - -5. The **Variable Update Policy**, which may be either **On Change** or **Periodically**. If **On Change** is chosen, the variable will be updated to the cloud whenever the change in value is greater than or equal to the set **threshold**. If **Periodically** is chosen, the variable will be updated to the cloud each time the number of seconds set is elapsed. - -## Configuring Network - -Configuring the network allows for connecting an Arduino, or third party devices to a Wi-Fi network. The credentials entered are saved in the **Secret file**, inside the sketch. - -Entering the network details can be done simply by navigating to **"Network"** and clicking on **"Configure"**. A popup screen appears where the **Network's Name** and **Password** can be entered. The network details are saved and only gets uploaded to the device when **the sketch is uploaded**. - -The network details can be modified by clicking the **"Change"** button, correcting the entered credentials, saving the new details, and uploading the sketch again. - -## Editing the sketch - -The **"Sketch"** tab in the **Things** page includes a code editor, which is a lite version of the Arduino Web Editor that enables for editing, formatting, compiling and saving a sketch. An automatically generated code is found in the editor after adding **at least one variable**. - -![Open with Arduino Web Editor](./images/open-with-web-editor.png) - -The sketch may be also displayed and modified in the full **Arduino Web Editor** by clicking the **"Open full editor"** button, which provides more features. - -The sketches generated automatically in IoT Cloud include four files: - -### thingProperties.h - -![Files generated in the automated sketch](./images/files-automated-sketch.png) - -This is a file containing the code generated by the Arduino IoT Cloud that should not be edited. This file includes the [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud) and [Arduino_ConnectionHandler](https://github.com/arduino-libraries/Arduino_ConnectionHandler) libraries, the network configuration, initializations of variables and function, and properties of each variable saved in the `initProperties()` function. - -The example below shows a basic code generated in the `thingProperties.h` file as a result of adding two variables. The first variable **"Variable_Name_01"** is an integer variable with a **READ & WRITE** permission, and the second is a **READ ONLY** CloudTemperature variable. - -***Please note: for READ & WRITE variables a callback function (in this case called `onVariableName01Change()`) is automatically generated in sketch. This will allow for writing commands inside the function to trigger actions whenever the value is changed from the cloud.*** - -```arduino -#include ArduinoIoTCloud.h -#include Arduino_ConnectionHandler.h - -const char SSID[] = SECRET_SSID; // Network SSID (name) -const char PASS[] = SECRET_PASS; // Network password (use for WPA, or use as key for WEP) - -void onVariableName01Change(); // declaring a function for the read & write variables - -int Variable_Name_01; // declare a normal integer variable -CloudTemperature Variable_Name_02; // declare a Cloud specific temperature variable - -void initProperties(){ - - ArduinoCloud.addProperty(Variable_Name_01, READWRITE, ON_CHANGE, onVariableName01Change); // linking the read & write variable with its function and updating it on change - ArduinoCloud.addProperty(Variable_Name_02, READ, 10 * SECONDS, NULL); // setting up the read only variable and updating it every 10 seconds - -} - -WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS); // setting up the network name and password chosen in the Network configuration -``` - -***As of 2022/02/09 the `thingProperties.h` no longer contains your Thing ID. If you have created a Thing prior to this date, simply update your Thing and your `thingProperties.h` will automatically be updated. You can see the lines that were removed in the snippet below:*** - -```arduino -const char THING_ID[] = "A-UNIQUE-THING-ID-NUMBER"; - -ArduinoCloud.setThingId(THING_ID); //previously located inside initProperties() -``` - - -### sketch.ino - -This file includes the main Arduino sketch that can be **edited and uploaded to the device**. The sketch includes the `thingProperties.h` file, the `setup()` and `loop()` functions, and an empty function for every **Read & Write** variable. The code below is a basic example of an auto generated code in the sketch file, using the same variables from the previous example displayed in `thingProperties.h` section. - -```arduino -#include "thingProperties.h" - -void setup() { - Serial.begin(9600); // Initialize serial and wait for port to open: - delay(1500); // This delay gives the chance to wait for a Serial Monitor without blocking if none is found - - initProperties(); // Defined in thingProperties.h - - ArduinoCloud.begin(ArduinoIoTPreferredConnection); // Connect to Arduino IoT Cloud - - setDebugMessageLevel(2); - ArduinoCloud.printDebugInfo(); -} - -void loop() { - ArduinoCloud.update(); - // Your code here -} - -void onVariableName01Change() { - // Do something -} - -``` - -The `setup()` function includes an initialization of the **Serial Monitor** and the **properties** using the `Serial.begin(9600);` and `initProperties();` commands. Additionally, the **connection to the Arduino IoT Cloud** is initialized using the `ArduinoCloud.begin(ArduinoIoTPreferredConnection);` command, which uses methods from the [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud) and [Arduino_ConnectionHandler](https://github.com/arduino-libraries/Arduino_ConnectionHandler) libraries that are included in the `thingProperties.h` file. Finally, `setDebugMessageLevel(2);` and `ArduinoCloud.printDebugInfo();` are used for **debugging**, it prints information related to the state of **network and IoT Cloud connection and errors**. The higher number the more granular information obtained, the default is 0 (only errors) and the maximum is 4. - -### Secret - - This is a file to save sensitive data such as passwords and API keys that will be protected and hidden from public access. The network configuration details are saved in this file. - -### ReadMe.adoc - - This is a Read Me file as a placeholder for adding a description of the project. - -### Uploading A Sketch - -Uploading a sketch through the Arduino IoT Cloud can be achieved in two ways, either through the code editor in the thing page (**Sketch** tab) or through the full editor (click on "Open full editor" to open it). - -The full editor allows for more control over the code and its libraries and provides access to all files included in the sketch, as well as more editing and sharing options. - -***Please note: the status of the connection to the Network and Arduino IoT Cloud may be checked by opening the Serial Monitor after uploading a sketch. If the `while(!Serial);` loop is included in the `setup()` function, the code would not execute before opening the Serial Monitor.*** - - -## Dashboards & Widgets - -Dashboards are **visual user interfaces** for interacting with your boards over the cloud, which can be customized with different setups depending on the project's needs. - -One or more **Things** can be added to a **Dashboard**, with all or some of their variables. The dashboards can be accessed by navigating to the **“Dashboards”** page at the top menu of the Arduino IoT Cloud interface, where a list of the **existing Dashboards** and an option to **create a new Dashboard** are available. - -![Create widgets from a Thing](./images/create-widget-from-thing.png) - -***You can read more about [Dashboards & Widgets](/arduino-cloud/getting-started/dashboard-widgets).*** - -## Recommended Code Practices - -This section highlights some important aspects of writing code with regard to the implementations in the [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud). - -### Watchdog Timer (WDT) - -All IoT Cloud sketches use a **Watchdog Timer (WDT)** by default. The WDT can be used to automatically recover from hardware faults or unrecoverable software errors. - -A WDT is essentially a countdown timer, whereas it starts counting from a set value, and upon reaching zero, it resets the board. To prevent it from reaching zero, we continuously call it from the `loop()`, using the `ArduinoCloud.update()` function. - -This is why, it is very important to not use any long blocking code in your sketch. For example, using a long `delay()` inside the `loop()` is **strongly discouraged**, as the WDT can reach zero and reset the board. - -The WDT can however be disabled inside of the `setup()` function, by adding the `false` parameter: - -```arduino -ArduinoCloud.begin(ArduinoIoTPreferredConnection, false). -``` - -***You can view the source code of this implementation [here](https://github.com/arduino-libraries/ArduinoIoTCloud/tree/master/src/utility/watchdog).*** - -### Alternatives to Delays - -The `loop()` function includes the `ArduinoCloud.update();` call, which sends data to the cloud and receives updates. In order to get the best responsiveness in your cloud-connected projects, the `loop()` function should run as fast as possible. This means that no blocking commands should be used inside, and you should prefer a non-blocking programming approach whenever possible. - -A common **blocking pattern** is the use of the `delay()` function which stops the execution of the function for the given time. We strongly advise to **get rid of this function** and achieve the same behavior in a non-blocking way with the `millis()` function as described below. - -Let's see how to blink a LED. The traditional way involves the `delay()` function: - -```arduino -void loop() { - ArduinoCloud.update(); - - digitalWrite(LED_BUILTIN, HIGH); - delay(1000); - digitalWrite(LED_BUILTIN, LOW); - delay(1000); -} -``` - -This works, but it will cause a delay of at least two seconds between one execution of `ArduinoCloud.update()` and the next one, thus causing bad performance of the cloud communication. - -This can be rewritten in a non-blocking way as follows: - -```arduino -void loop() { - ArduinoCloud.update(); - - digitalWrite(LED_PIN, (millis() % 2000) < 1000); -} -``` - -How does this work? It gets the current execution time provided by `millis()` and divides it by 2 seconds. If the remainder is smaller than one second it will turn the LED on, and if it's greater it will turn the LED off. - -For a more complex and commented example, you can have a look at the [BlinkWithoutDelay example](/built-in-examples/digital/BlinkWithoutDelay). - -### I2C Usage - -Components connected via I²C (including the sensors onboard the [MKR IoT Carrier](https://store.arduino.cc/products/arduino-mkr-iot-carrier)) uses the same bus as the **ECCX08** cryptochip. As the crypto chip is an essential part of establishing a connection to the IoT Cloud (it contains the credentials), it is important that other I²C peripherals are initialized after the connection has been made. - -For example, if you are initializing a library such as [Arduino_MKRENV](https://www.arduino.cc/reference/en/libraries/arduino_mkrenv), your `setup()` should be implemented as: - -```arduino -void setup() { - Serial.begin(9600); - delay(1500); - - initProperties(); - - ArduinoCloud.begin(ArduinoIoTPreferredConnection); - setDebugMessageLevel(2); - ArduinoCloud.printDebugInfo(); - - //initializing the Arduino_MKRENV library - if (!ENV.begin()) { - Serial.println("Failed to initialize MKR ENV shield!"); - while (1); - } -``` - - -### Avoid Blocking Serial Communication - -`while(!Serial) {}` loops endlessly until the Serial Monitor is opened. This is a useful practice in cases where you want to see all debug output from the start of the sketch execution. However, when building IoT systems using **`while(!Serial){}` can hinder our project from running autonomously**, stopping the board from connecting to the network and IoT Cloud before manually opening the Serial Monitor. Therefore, it is recommended to consider removing the `while(!Serial){}` loop if it's not necessary. - -A common trick is to add a **`delay(1500);` command after `Serial.begin(9600);`**. This will slightly slow down the initialization of your device, but will give you some time to open the serial monitor when you're interested in seeing its output within losing the very first lines. - - -## Arduino IoT Cloud API - -We provide two Arduino Iot Cloud APIs: - -**1.** The first is the **REST API** which allows you to adding and configuring new Arduino IoT Cloud Devices, Things, Properties, as well as reading historical data. An example of this API's use is making custom dashboards in a local server. A full [documentation of the Arduino IoT Cloud REST API](https://www.arduino.cc/reference/en/iot/api/) is available for advanced users. - - The Arduino IoT Cloud REST API can be called just with any **HTTP Client**, or using one of these clients: - - [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client). - - [Python® PYPI Package](https://pypi.org/project/arduino-iot-client/). - - [Golang Module](https://github.com/arduino/iot-client-go). - -**2.** The second is the **Data API (MQTT)** which allows you to send/receive Variables' data. An example of this API's use is sending IoT Cloud Variables' updates to the browser. A full [documentation of the Arduino IoT Cloud Data API (MQTT)](https://www.npmjs.com/package/arduino-iot-js) is available for advanced users. - - - - - - - diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-01.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-01.png deleted file mode 100644 index 8948dd80c2..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-01.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-02.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-02.png deleted file mode 100644 index 774c689b5e..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-02.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-03.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-03.png deleted file mode 100644 index 0cfd12bd7e..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-03.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-04.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-04.png deleted file mode 100644 index 1eefcc9df9..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-04.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-05.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-05.png deleted file mode 100644 index 102d4457d6..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-05.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-06.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-06.png deleted file mode 100644 index f8fd811f07..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-06.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-07.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-07.png deleted file mode 100644 index 31ac7ada3e..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-07.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-08.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-08.png deleted file mode 100644 index 89e5a798bb..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-08.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-09.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-09.png deleted file mode 100644 index 65148585f3..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-09.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-10.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-10.png deleted file mode 100644 index ba08de0e48..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-10.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-11.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-11.png deleted file mode 100644 index 1855e7a8d6..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-11.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-12.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-12.png deleted file mode 100644 index 220096940d..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-12.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-13.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-13.png deleted file mode 100644 index 0ebb6b0541..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-13.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-14.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-14.png deleted file mode 100644 index 6b12a72995..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-14.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-15.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-15.png deleted file mode 100644 index 73b0b9b00f..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-15.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-16.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-16.png deleted file mode 100644 index c4330ffdd8..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-16.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-17.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-17.png deleted file mode 100644 index 4cfb631e58..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-17.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-18.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-18.png deleted file mode 100644 index 5d819de7bd..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-18.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-19.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-19.png deleted file mode 100644 index 6805405a20..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-19.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-20.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-20.png deleted file mode 100644 index 98ead4333f..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-20.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-21.png b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-21.png deleted file mode 100644 index d8ccf78088..0000000000 Binary files a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/assets/cloud-esp32-img-21.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/esp-32-cloud.md b/content/arduino-cloud/01.getting-started/05.esp-32-cloud/esp-32-cloud.md deleted file mode 100644 index f1d06649b6..0000000000 --- a/content/arduino-cloud/01.getting-started/05.esp-32-cloud/esp-32-cloud.md +++ /dev/null @@ -1,227 +0,0 @@ ---- -title: 'Connecting ESP32 & ESP8266 to Arduino Cloud IoT' -difficulty: beginner -description: 'Learn how to send data between an ESP32 / ESP8266 development board and the Arduino Cloud IoT.' -tags: - - ESP32 - - ESP8266 - - Installation - - Cloud IoT -author: 'Karl Söderby' -hardware: - - _snippets/hardware/led - - _snippets/hardware/jumper-wires - - _snippets/hardware/breadboard -software: - - iot-cloud ---- - -## Introduction - -In this tutorial, we will go through the steps necessary to set up an **ESP32 / ESP8266 development board** with the Arduino Cloud IoT. To test it out, we will send random values from the board to the cloud, and set up a switch that can enable the built-in LED on the board. - -***Over-the-air (OTA) uploads is now supported on ESP32 boards. You can read more about this feature in the [OTA uploads article](/arduino-cloud/features/ota-getting-started).*** - -## Goals - -The goals of this project are: - -- Send data to the cloud from the board. -- Turn ON/OFF an LED on the board through the cloud. - -## Hardware & Software needed - -- ESP32 / ESP8266 development board. -- [Arduino Cloud IoT](https://create.arduino.cc/iot/). - -We will also need the following components for the circuit: - -- LED -- 220 ohm resistor -- Breadboard -- Jumper Wires - -## Circuit - -Follow the circuit below to connect the LED to the ESP32 / ESP8266 board. - ->**Note: if you prefer to use your board's built-in LED, you do not need a circuit.** - -![The circuit for this tutorial.](assets/cloud-esp32-img-01.png) - -## Setting up the Arduino Cloud IoT - -To start, we will need to head over to the [Arduino Cloud IoT](https://create.arduino.cc/iot/). This is also accessible through the menu at the top right. - -![Navigate to the cloud.](assets/cloud-esp32-img-02.png) - -### Step 1: Setting up the device - -**1.** Once in the cloud, click on the **"Devices"** tab. Then, click on the **"Add device"** button. - -![Adding a device.](assets/cloud-esp32-img-03.png) - -**2.** Then, click on **"Set up a 3rd party device"**. - -![Setting up a third party device.](assets/cloud-esp32-img-04.png) - -**3.** Now we need to select what board we are using. Select either ESP32 or ESP8266, and then choose the board from the drop-down menu. - -![Select the board.](assets/cloud-esp32-img-05.png) - -**4.** Now the board needs a name. We choose **My_ESP32**, but you can have a lot more imagination than that! - -![Naming the board.](assets/cloud-esp32-img-06.png) - -**5.** You will now receive your **Device ID** and **Secret key**. Please note that the secret key cannot be recovered, so make sure you note it down. You can also download a PDF with the information. - -When you have saved it, tick the box at the bottom, and click on **"Continue"**. - -![Credentials of your board.](assets/cloud-esp32-img-07.png) - -Congratulations! You have now configured your ESP32 board with the Arduino Cloud IoT. Your device will now appear in the list of devices. - -### Step 2: Creating a Thing - -The next step is to create a Thing. This is done by navigating to the **"Things"** tab. - -![Go to the Thing tab.](assets/cloud-esp32-img-09.png) - -Then, we need to create a new Thing, by clicking on the **"Create Thing"** button. We can then rename our Thing something appropriate to what we are doing, in this case we simply chose **ESP32 Project**. - -![Creating a Thing.](assets/cloud-esp32-img-10.png) - -Now, we need to link our device with our Thing. This is done by clicking on the button in the **"Device"** section. This will open a window, where your ESP32 / ESP8266 should be available to select. - -![Select ESP32 / ESP8266 device.](assets/cloud-esp32-img-11.png) - -Once the device is linked, we need to create two variables: `random_value` and `led_switch`. Click on **"Add variable"** button. This will open a window where you need to fill in variable information. Let's create the `random_value` first. The data type is **int**, permission is **read only** and update policy is **on change**. - -Once done, click on the **"Add variable"** button. - -![Adding the random_value variable.](assets/cloud-esp32-img-12.png) - -Now, let's also add the `led_switch` variable. The data type for this variable is **boolean**, the permission is **read & write**, and update policy is **on change**. - -Once done, click on the **"Add variable"** button. - -![Adding the led_switch variable.](assets/cloud-esp32-img-13.png) - -### Step 3: Adding credentials - -Now, we need to enter the credentials for our network, plus the secret key generated during the device configuration. - -First, click on the button in the **"Network Section"**. - -![Open the credentials tab.](assets/cloud-esp32-img-14.png) - -Then, enter the credentials (network name, network password and secret key). Click **"Save"** when finished. - -![Entering the credentials.](assets/cloud-esp32-img-15.png) - -## Programming the board - -The next step is to program the board. To do so, we need to go to the **"Sketch"** tab. - -![Navigate to the sketch tab.](assets/cloud-esp32-img-16.png) - -The code for this tutorial can be found in the snippet below. Upload it to the board by clicking on the **"Upload"** button at the top left corner. - -## Complete sketch - ->**Note:** in this tutorial we are using pin 13 for the LED. You can easily change this to another GPIO, by editing the LED variable. - -```arduino -#include "thingProperties.h" - -int LED = 13; - -void setup() { - pinMode(LED, OUTPUT); - // 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 - random_value = random(0, 500); - delay(500); -} - - -void onLedSwitchChange() { - // Do something - if(led_switch){ - digitalWrite(LED, HIGH); - } - else{ - digitalWrite(LED, LOW); - } -} -``` - -If the upload was successful, we should see it printed in the console at the bottom of the editor. - -![Successful upload of sketch.](assets/cloud-esp32-img-17.png) - -## Creating a dashboard - -Now that the sketch is running on the ESP32 / ESP8266 board, we can move on to the final step, which is creating a dashboard. - -First, navigate to the **"Dashboards"** tab. - -![Navigating to the dashboards tab.](assets/cloud-esp32-img-18.png) - -Then, click on the **"Build dashboard"** button. - -![Click on the "Build dashboard" button.](assets/cloud-esp32-img-19.png) - -To edit the dashboard, click on the pencil icon at the top left icon, select **"Things"** and search for your Thing. Select it, and click on **"Add widgets"** as shown in the image below. - -![Adding widgets.](assets/cloud-esp32-img-20.png) - -We should now have two widgets that are linked to your ESP32 / ESP8266 board. - -- `random_value` - whenever the `random_value` updates on the board, it also updates here. -- `led_switch` - when we activate this switch, we turn ON the LED connected to the board (pin 13). - -![Complete dashboard.](assets/cloud-esp32-img-21.png) - - -## Troubleshooting - -If you are having issues completing this tutorial, make sure that the following is correct: - -- We have entered the right **secret key** in the credentials window. -- We have entered the right **network name** and **password** in the credentials window. -- We have selected the right device (if you have multiple devices registered in the cloud, you may have selected the wrong device). - ->**Note:** The Arduino Cloud IoT's support for the ESP32 is in an experimental stage. - - -## Conclusion - -In this tutorial, we went through the basics of setting up an ESP32 / ESP8266 microcontroller to communicate with the Arduino Cloud IoT. We tested this out by sending a **random value** from the board to the cloud, and by creating a switch that **controls an LED** from the cloud. - -### More tutorials - -You can find more tutorials in the [Arduino IoT Cloud documentation page](/arduino-cloud/). \ No newline at end of file diff --git a/content/arduino-cloud/01.getting-started/06.cloud-variables/assets/add-vars.png b/content/arduino-cloud/01.getting-started/06.cloud-variables/assets/add-vars.png deleted file mode 100644 index 44b242e340..0000000000 Binary files a/content/arduino-cloud/01.getting-started/06.cloud-variables/assets/add-vars.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/cloud-widgets.png b/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/cloud-widgets.png deleted file mode 100644 index cd82fed152..0000000000 Binary files a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/cloud-widgets.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-activate-bkg-mode.png b/content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-activate-bkg-mode.png deleted file mode 100644 index fa5d9758cb..0000000000 Binary files a/content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-activate-bkg-mode.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-dashboard.png b/content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-dashboard.png deleted file mode 100644 index 5490c0b1ce..0000000000 Binary files a/content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-dashboard.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-setup.png b/content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-setup.png deleted file mode 100644 index af610a77d6..0000000000 Binary files a/content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-setup.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/dashboard.png b/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/dashboard.png deleted file mode 100644 index 5247c51461..0000000000 Binary files a/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/dashboard.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/get-key.png b/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/get-key.png deleted file mode 100644 index b02dc6fbfd..0000000000 Binary files a/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/get-key.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/thing.png b/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/thing.png deleted file mode 100644 index 3e69ec4c8a..0000000000 Binary files a/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/thing.png and /dev/null differ diff --git a/content/arduino-cloud/01.getting-started/getting-started.md b/content/arduino-cloud/01.getting-started/getting-started.md deleted file mode 100644 index 7edab30465..0000000000 --- a/content/arduino-cloud/01.getting-started/getting-started.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Getting Started ---- \ No newline at end of file diff --git a/content/arduino-cloud/01.guides/00.overview/assets/dashboard-app.png b/content/arduino-cloud/01.guides/00.overview/assets/dashboard-app.png new file mode 100644 index 0000000000..bc1079a951 Binary files /dev/null and b/content/arduino-cloud/01.guides/00.overview/assets/dashboard-app.png differ diff --git a/content/arduino-cloud/01.guides/00.overview/assets/dashboard.png b/content/arduino-cloud/01.guides/00.overview/assets/dashboard.png new file mode 100644 index 0000000000..1c23cc2e51 Binary files /dev/null and b/content/arduino-cloud/01.guides/00.overview/assets/dashboard.png differ diff --git a/content/arduino-cloud/01.guides/00.overview/assets/device.png b/content/arduino-cloud/01.guides/00.overview/assets/device.png new file mode 100644 index 0000000000..64e0cadc19 Binary files /dev/null and b/content/arduino-cloud/01.guides/00.overview/assets/device.png differ diff --git a/content/arduino-cloud/01.guides/00.overview/assets/editor.png b/content/arduino-cloud/01.guides/00.overview/assets/editor.png new file mode 100644 index 0000000000..bcb5d7b8cc Binary files /dev/null and b/content/arduino-cloud/01.guides/00.overview/assets/editor.png differ diff --git a/content/arduino-cloud/01.guides/00.overview/assets/home.png b/content/arduino-cloud/01.guides/00.overview/assets/home.png new file mode 100644 index 0000000000..d8c76c8572 Binary files /dev/null and b/content/arduino-cloud/01.guides/00.overview/assets/home.png differ diff --git a/content/arduino-cloud/01.guides/00.overview/assets/overview-interaction.png b/content/arduino-cloud/01.guides/00.overview/assets/overview-interaction.png new file mode 100644 index 0000000000..710ac18cc7 Binary files /dev/null and b/content/arduino-cloud/01.guides/00.overview/assets/overview-interaction.png differ diff --git a/content/arduino-cloud/01.guides/00.overview/assets/overview-monitor.png b/content/arduino-cloud/01.guides/00.overview/assets/overview-monitor.png new file mode 100644 index 0000000000..42f746856b Binary files /dev/null and b/content/arduino-cloud/01.guides/00.overview/assets/overview-monitor.png differ diff --git a/content/arduino-cloud/01.guides/00.overview/assets/thing.png b/content/arduino-cloud/01.guides/00.overview/assets/thing.png new file mode 100644 index 0000000000..591be0e7e0 Binary files /dev/null and b/content/arduino-cloud/01.guides/00.overview/assets/thing.png differ diff --git a/content/arduino-cloud/01.guides/00.overview/overview.md b/content/arduino-cloud/01.guides/00.overview/overview.md new file mode 100644 index 0000000000..5a08e1fc3b --- /dev/null +++ b/content/arduino-cloud/01.guides/00.overview/overview.md @@ -0,0 +1,150 @@ +--- +title: 'Getting Started with Arduino Cloud' +description: 'Get started with the Arduino Cloud, an online platform that makes it easy for you to code, deploy and monitor IoT projects.' +tags: [Arduino Cloud, Getting Started] +author: 'Karl Söderby' +--- + +The [Arduino Cloud](app.arduino.cc) is a platform for developing Arduino projects and connecting them to the world. It supports secure connections with boards via [Wi-Fi®](/arduino-cloud/hardware/wifi), [LoRa®](/arduino-cloud/hardware/lora), [Ethernet](/arduino-cloud/hardware/ethernet) and [Cellular (GSM/NB-IoT)](/arduino-cloud/hardware/cellular), and lets you create a system for sending any variable information you can think of from one board to another within minutes of unboxing them. + +The Arduino Cloud platform includes: +- an **Integrated Development Environment (IDE)** for programming your boards, +- a **cloud backend service** for synchronizing data from Arduino boards, but also from [Python](/arduino-cloud/guides/python) & [JavaScript](/arduino-cloud/guides/javascript) clients, +- a **graphical tool (dashboard)** for controlling and monitoring your board (as well as an [mobile app](/arduino-cloud/iot-remote-app/getting-started)). +- [REST API](/arduino-cloud/api/arduino-iot-api) and [command line tools](/arduino-cloud/arduino-cloud-cli/getting-started) for larger scale automations. + +Very simply explained, with the Arduino Cloud you can: +1. Create a program for an Arduino based on a brilliant idea you just hatched. +2. Upload the program to your board and synchronize any data you want to (most commonly through Wi-Fi®). +3. Create a dashboard with a set of widgets to control and monitor your data. + +Developing a sketch made for the Arduino Cloud is almost just like developing any other sketch. You have your setup, and loop just like normal. But you are also able to select variables to be automatically synced to the Arduino Cloud. + +Once a variable is synced to the Arduino Cloud you can access it from any of your other devices connected to the Arduino Cloud. + +Once you have setup your project, this is how you could interact & monitor it. + +For example, turning ON / OFF a light connected to a device would work like this: + +![Interacting with your device](assets/overview-interaction.png) + +And if you want to read the value of a sensor connected to your device, it would work like this: + +![Monitoring your device.](assets/overview-monitor.png) + +Networking code and data synchronizing is **automatically done**, so just focus on the project, and let the Arduino Cloud handle the rest. + +***This document will help you get familiar with the [Arduino Cloud](app.arduino.cc) service, and once you've got a good hang of it, you can explore the [rest of the documentation](/arduino-cloud/).*** + +## Compatible Boards + +***Throughout the documentation, we will often refer to a "board" as a "device". A board is your physical hardware or virtual setup (Python/JS), and a "device" is how it is configured in the cloud.*** + +Compatibility with the Arduino Cloud is divided into two categories: +- **Cloud Editor Support** - you can program **any** official Arduino board in the cloud editor. The editor also supports a large amount of third party boards. +- **IoT Support** - board with a radio module (e.g. Wi-Fi®) are supported. ESP32 based boards are also supported. + +For more information and list of supported boards, see the links below: +- [Wi-Fi®](/arduino-cloud/hardware/wifi) +- [LoRa®](/arduino-cloud/hardware/lora) +- [Ethernet](/arduino-cloud/hardware/ethernet) +- [Cellular (GSM/NB-IoT)](/arduino-cloud/hardware/cellular). + +***You can also create something called [manual devices](/arduino-cloud/hardware/devices#manual-devices), which allows you to create a virtual instance directly on your computer using JavaScript, Python or MicroPython.*** + +## Overview + +![The Arduino Cloud home page.](assets/home.png) + +Anything in the Arduino Cloud can be accessed via the left action bar. In the list below, some with links to a documentation pages. + +- **[Sketches](/arduino-cloud/cloud-interface/sketches)** - your sketches (programs) are stored here, divided into either a "normal" or "cloud" sketch. +- **[Devices](/arduino-cloud/hardware/devices)** - here you can configure your Arduino boards, ESP32 devices, manual devices (Python, JavaScript and more). +- **[Things](/arduino-cloud/cloud-interface/things)** - a Thing is a project configuration, where you select device, create variables to synchronize, and enter credentials. +- **[Dashboards](/arduino-cloud/cloud-interface/dashboard-widgets)** - dashboards are used to monitor & control your board through widgets. There's also a [mobile version](/arduino-cloud/iot-remote-app/getting-started) available to view your dashboards from a smartphone. +- **[Triggers](/arduino-cloud/cloud-interface/triggers)** - triggers can be used to send emails and push notifications based on a value change of a variable. +- **Resources** - helpful links and resources. You might have found this article here. +- **Courses** - tailored content for specific products and kits connected to the Arduino Cloud. +- **Templates** - templates are ready-made project that will automatically configure your device, Thing, +- **Integrations** - third party services that are integrated with the Arduino Cloud. + +## A Walkthrough the Arduino Cloud + +Setting up a project in the Arduino Cloud is easy, and can be done through a few simple steps summarized in this section. + +### 1. Create an Account + +To use the Arduino Cloud, you will need an Arduino account, which you can register [here](https://login.arduino.cc/login). + +By default, you will have a **free plan**, which can be upgraded to a number of affordable plans starting at 1.99$ a month. + +***Read more about [Arduino Cloud plans](https://cloud.arduino.cc/plans)*** + +### 2. Configure a Device + +First you will need to connect your board to your computer, and configure your device in the [Devices](app.arduino.cc/devices) tab. + +![Devices in the Arduino Cloud.](assets/device.png) + +The configurations varies between boards, but everything is covered in the installation wizard. + +***Learn more in the documentation for [Arduino Cloud Devices](/arduino-cloud/hardware/devices).*** + +### 3. Create a Thing + +After configuring a device, we can create a Thing, which is the **virtual twin** of your board. Here we configure network details, select device we want to associate and create the variables that we want to synchronize. + +![Things in the Arduino Cloud.](assets/thing.png) + +Variables we create will be used in the sketch, and will keep synchronizing as long as the board is connected to the cloud. + +When working with your IoT projects, consider this the "main space" for configurations, as you can access your sketches from here as well. + +***Learn more in the documentation for [Arduino Cloud Things](/arduino-cloud/cloud-interface/things).*** + +### 4. Write a Sketch + +Once you have done the above configurations, you can move on to **create a program/sketch**. This is where *you* decide what you want to create, and what data you want sent to the cloud. + +![A sketch in the Arduino Cloud.](assets/editor.png) + +When your program is ready, upload it to your board. If your board supports [Over-the-air (OTA)](/arduino-cloud/features/ota-getting-started) uploads, you can from now on upload without your board being connected to your computer! + +***Learn more in the documentation for [Arduino Cloud sketches](/arduino-cloud/cloud-interface/sketches).*** + +### 5. Create a Dashboard + +A dashboard allows you to interact with your device from a web interface or mobile app. A dashboard is composed of **widgets**, which you can link to a variable in your Thing. + +![Dashboards in the Arduino Cloud.](assets/dashboard.png) + +Choose from switches, sliders, RGB picker, message box, gauges and much more to create dashboards. Dashboards are not linked to a specific Thing/device, meaning you can control many different boards from the same dashboard. + +Some widgets can be linked to multiple variables, for example the [Advanced Chart](/arduino-cloud/cloud-interface/dashboard-widgets#advanced-chart) widget can graph up to 4 variables from different boards simultaneously! + +***Learn more in the documentation for [Arduino Cloud dashboards](/arduino-cloud/cloud-interface/dashboard-widgets).*** + +### 6. Track Your Project + +Once you done all configurations, created a program & dashboard, you can sit back and monitor & interact with your project from the web interface or the mobile app. + +![Arduino Cloud Dashboard & IoT Remote App](assets/dashboard-app.png) + +## Guides + +We recommend checking out the following guides to get started with various coding frameworks: +- [Arduino / C++ setup (default setup)](arduino-cloud/guides/arduino-c) - the default installation using the built-in code editor and an Arduino / ESP32 board. +- [Python setup](/arduino-cloud/guides/python) - set up of a manual device to run on a PC / Linux system such as Raspberry Pi. +- [MicroPython setup](/arduino-cloud/guides/micropython) - setup of MicroPython on a select number of supported boards. +- [JavaScript / node.js setup](/arduino-cloud/guides/javascript) - setup of JavaScript using node.js, perfect for integrating your front-end projects with the Arduino Cloud. + +## Features + +Make sure to explore the various features of the Arduino Cloud through the links below: +- [**Data Monitoring**](/arduino-cloud/application-notes/cloud-environmental-data) - learn how to easily monitor environmental sensor values through a dashboard. +- [**Variable Synchronisation**](/arduino-cloud/features/thing-to-thing) - variable synchronisation allows you to sync variables across devices, enabling communication between devices with minimal coding. +- [**Scheduler**](/arduino-cloud/features/cloud-scheduler) - schedule jobs to go on/off for a specific amount of time (seconds, minutes, hours). +- [**Over-The-Air (OTA) Uploads**](/arduino-cloud/features/ota-getting-started) - upload code to devices not connected to your computer. +- [**Webhooks**](/arduino-cloud/features/webhooks) - integrate your project with another service, such as IFTTT. +- [**Amazon Alexa Support**](/arduino-cloud/guides/alexa) - make your project voice controlled with the Amazon Alexa integration. +- [**Dashboard Sharing**](/arduino-cloud/features/sharing-dashboards) - share your data with other people around the world. \ No newline at end of file diff --git a/content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_1.png b/content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_1.png similarity index 100% rename from content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_1.png rename to content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_1.png diff --git a/content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_2.png b/content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_2.png similarity index 100% rename from content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_2.png rename to content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_2.png diff --git a/content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_3.png b/content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_3.png similarity index 100% rename from content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_3.png rename to content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_3.png diff --git a/content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_4.png b/content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_4.png similarity index 100% rename from content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_4.png rename to content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_4.png diff --git a/content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_5.png b/content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_5.png similarity index 100% rename from content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_5.png rename to content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_5.png diff --git a/content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_6.png b/content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_6.png similarity index 100% rename from content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_6.png rename to content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_6.png diff --git a/content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_7.png b/content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_7.png similarity index 100% rename from content/arduino-cloud/01.getting-started/03.getting-started-web-editor/assets/WebEditorInstall_7.png rename to content/arduino-cloud/01.guides/01.cloud-editor/assets/WebEditorInstall_7.png diff --git a/content/arduino-cloud/01.getting-started/03.getting-started-web-editor/getting-started-web-editor.md b/content/arduino-cloud/01.guides/01.cloud-editor/getting-started-cloud-editor.md similarity index 53% rename from content/arduino-cloud/01.getting-started/03.getting-started-web-editor/getting-started-web-editor.md rename to content/arduino-cloud/01.guides/01.cloud-editor/getting-started-cloud-editor.md index 2e23fb3716..9894803fa8 100644 --- a/content/arduino-cloud/01.getting-started/03.getting-started-web-editor/getting-started-web-editor.md +++ b/content/arduino-cloud/01.guides/01.cloud-editor/getting-started-cloud-editor.md @@ -1,48 +1,51 @@ --- -title: 'Getting started with the Web Editor' +title: 'Cloud Editor' description: 'A step-by-step guide to set up your online development environment.' author: 'Karl Söderby' --- -## Getting started with the Web Editor -The Web Editor is a great choice for working with your Arduino board. It stores all of your sketches online, requires no installation of cores and includes most of the popular libraries. +The Cloud Editor is a great choice for working with your Arduino board. It stores all of your sketches online, doesn't require you to install board packages and includes most of the popular libraries, while letting you upload your own if you need to. -Getting started with the Web Editor is quick & easy, and in this tutorial, we will walk you through the necessary steps so you can use it with your Arduino board. +Getting started with the Cloud Editor is quick & easy, and in this tutorial, we will walk you through the necessary steps so you can use it with your Arduino board. ->**Note:** This tutorial works with **all** official Arduino boards. +This tutorial works with **all** official Arduino boards. -### Goals +***Note: The Cloud Editor is previously known as the "Create Editor", or "Web Editor".*** + +## Goals In this tutorial, we will achieve the following: -- Creating an account (required to use the Web Editor). +- Creating an account (required to use the Cloud Editor). - Download and install the [Create Plugin](https://create.arduino.cc/getting-started/plugin/welcome). - Make sure our board is recognized by the computer. - Upload a simple blink example. -### Hardware & software needed +## Hardware & Software Needed -- [Arduino Web Editor](https://create.arduino.cc/editor) +- [Arduino Cloud Editor](https://create.arduino.cc/editor) - [Create Agent](https://create.arduino.cc/getting-started/plugin/welcome) - Arduino board - USB cable (different depending on the board you are using). -### Setting up the Web Editor +## Setting up the Cloud Editor -We will now go through the necessary steps to get your Arduino board working with the Web Editor. +We will now go through the necessary steps to get your Arduino board working with the Cloud Editor. -#### Creating an account +### Create an Account -The first step is to create an account. This is done by navigating to login.arduino.cc/login. Here, you can either manually create an account, or login using for example Google. +The first step is to create an account. This is done by navigating to the [Log-in page](login.arduino.cc/login). Here, you can either manually create an account, or log in using for example Google. ![Log in to your Arduino account.](assets/WebEditorInstall_1.png) -### Installing the plugin +### Install a Plugin Once you have created and activated your account, we need to install the **Create Plugin.** This is done by navigating to the [Create Agent Installation page](https://create.arduino.cc/getting-started/plugin/welcome). Here, you simply need to click on **"Start"** to begin the installation. -![Installing .](assets/WebEditorInstall_2.png) +![Installing.](assets/WebEditorInstall_2.png) + +The Create Agent is a piece of software that runs on your computer, and acts as a bridge between your board and your browser. Without it, the browser is not able to see what board you have connected to your computer, or upload code to it. Follow the instructions at this page to complete the installation. You will need to download the Create Agent in this process, and install it locally on your machine. @@ -50,7 +53,7 @@ When we are done, we should see this screen: ![Agent successfully installed.](assets/WebEditorInstall_3.png) -Congratulations, you now have the necessary tools to start using the Web Editor. +Congratulations, you now have the necessary tools to start using the Cloud Editor. > You can find the Arduino Create Agent files by following the path that relates to your operative system: > @@ -60,13 +63,13 @@ Congratulations, you now have the necessary tools to start using the Web Editor. > > **Linux:** `/home//ArduinoCreateAgent` -### Uploading a simple example +## Upload a Program -Now, let's take a look at how the Web Editor works, by uploading a simple example to the board. First, we need to navigate to the Web Editor, by either [clicking this link](https://create.arduino.cc/editor) or clicking the menu at the top right corner, following the image below: +Now, let's take a look at how the Cloud Editor works, by uploading a simple example to the board. First, we need to navigate to the Cloud Editor, by either [clicking this link](https://create.arduino.cc/editor) or clicking the menu at the top right corner, following the image below: -![Clicking on the Web Editor button.](assets/WebEditorInstall_4.png) +![Clicking on the Cloud Editor button.](assets/WebEditorInstall_4.png) -Once you are in the Web Editor, you can see any board that you have connected to the computer. In this case, we have a **Arduino MKR WiFi 1010** at port **COM29** connected. Yours may look differently. This means that the board is recognized and the Create Agent is working. +Once you are in the Cloud Editor, you can see any board that you have connected to the computer. In this case, we have a **Arduino MKR WiFi 1010** at port **COM29** connected. Yours may look differently. This means that the board is recognized and the Create Agent is working. ![Check if connected boards can be found.](assets/WebEditorInstall_5.png) @@ -84,8 +87,4 @@ Once it is uploaded, there should be a message in the bottom of the editor sayin Success. Saved on your online Sketchbook and done uploading Blink. ``` -If we look at the board we uploaded the code to, we should see the onboard LED blink with an interval of 1 second. This means that you have successfully used the Web Editor to upload a code to your board! - -#### More tutorials - -You can find more tutorials in the [Arduino Cloud documentation page](/arduino-cloud). +If we look at the board we uploaded the code to, we should see the onboard LED blink with an interval of 1 second. This means that you have successfully used the Cloud Editor to upload a code to your board. diff --git a/content/arduino-cloud/01.guides/02.arduino-c/arduino-c.md b/content/arduino-cloud/01.guides/02.arduino-c/arduino-c.md new file mode 100644 index 0000000000..7342d6f574 --- /dev/null +++ b/content/arduino-cloud/01.guides/02.arduino-c/arduino-c.md @@ -0,0 +1,127 @@ +--- +title: 'Arduino / C++' +description: 'Get started with the Arduino Cloud using the C++ programming language.' +tags: [Arduino Cloud, Setup] +author: 'Karl Söderby' +--- + +The default option for programming your board to connect to the Arduino Cloud is by using the **C++ language**. The configuration and connection between your board and the Arduino Cloud is supported by the [ArduinoIoTCloud library](https://github.com/arduino-libraries/ArduinoIoTCloud) & [Arduino_ConnectionHandler](https://github.com/arduino-libraries/Arduino_ConnectionHandler) libraries. + +***When programming in C++, you can use the Arduino API (which is also known as the Arduino Language). To learn more about the Arduino API, check out the [language reference](https://www.arduino.cc/reference/en/).*** + +Whenever you create a [Thing](/arduino-cloud/cloud-interface/things) in the Arduino Cloud, you automatically start generating a set of files that will handle the configurations, credentials & connection: +- `.ino` - your main sketch file, +- `thingProperties.h` - your main configuration file, +- `arduino_secrets.h` - your credentials file (for API key, Wi-Fi network etc.) + +***If you want to find out more about what the Arduino Cloud service can do, go to the [overview](/arduino-cloud/guides/overview) section.*** + +## Requirements + +For this guide, you will need to have a registered account at Arduino. Register through the link below: +- [Create an Arduino account](https://login.arduino.cc/login) + +You will also need a supported board: +- [Official Arduino Wi-Fi® boards](/arduino-cloud/hardware/wifi) +- [ESP32 / ESP8266 boards](/arduino-cloud/hardware/wifi#configure-esp-boards) +- [Official LoRaWAN® boards](/arduino-cloud/hardware/lora) +- [Official Ethernet setups](/arduino-cloud/hardware/ethernet) +- [Official cellular boards (GSM/NB-IoT)](/arduino-cloud/hardware/cellular) + +## Setup + +In this section, we will go through the steps necessary to connect your Arduino board to the Arduino Cloud. To follow these steps, please make sure you have a [registered Arduino account](https://login.arduino.cc/login), and that you have access to the [Arduino Cloud](app.arduino.cc). + +### Configure Device + +First navigate to [Arduino Cloud](app.arduino.cc), and click on the **Devices** tab. Here you can see all your devices, and configure a new one. Depending on what type of board you have, the configuration will vary. + +***For more details, see the [documentation for devices](/arduino-cloud/hardware/devices).*** + +### Configure Thing + +Next, navigate to the **Things** tab. Here you will see a list of your Things, and a button to create a new one. When you create a new Thing, you will open up a new configuration space. + +![Arduino Cloud Thing Interface](assets/thing-config.png) + +A "Thing" is a virtual twin of your hardware, and it is here that we create variables that we want to synchronize between the cloud and board. Any changes we make here will be reflected in an [automatically generated sketch](/arduino-cloud/cloud-interface/sketches#iot-sketches). + +1. First, let's attach the device we want to use, by clicking the **"Select Device"** button in the **"Associated Devices"** section to the right. +2. let's create a new variable, call it `test`, and select it to be a `boolean` type and with a **read/write** permission. +3. finally, configure your network in the **Network** section. Here you will enter your Wi-Fi® credentials, and if you are using an ESP32 based board, you need to enter the secret key here. + +![Enter network credentials.](assets/esp32-only.png) + +***Your secret key is obtained during the device configuration. Read more at [Configuring ESP boards](/arduino-cloud/hardware/wifi#configure-esp-boards).*** + +All the above configurations have now been generated into a set of files that can be accessed in the **Sketch** tab. + +***For more details, see the [documentation for Things](/arduino-cloud/cloud-interface/things).*** + +### Create Sketch + +The automatically generated sketch is now available to be edited. This sketch includes all necessities to connect to the cloud, and has a callback function generated for each **read/write** variable. + +Below is a sketch generated for a single `boolean` variable called `test`. We modified it to turn on/off the built-in LED of the board anytime the `test` bool is `true`. + +```arduino +#include "thingProperties.h" + +void setup() { + pinMode(LED_BUILTIN, OUTPUT); + + Serial.begin(9600); + delay(1500); + + initProperties(); + + ArduinoCloud.begin(ArduinoIoTPreferredConnection); + + setDebugMessageLevel(2); + ArduinoCloud.printDebugInfo(); +} + +void loop() { + ArduinoCloud.update(); +} + +void onTestChange() { + if(test){ + digitalWrite(LED_BUILTIN, HIGH); + } + else{ + digitalWrite(LED_BUILTIN, LOW); + } +} +``` + +- The sketch is automatically updated whenever you change your Thing (e.g. adding a variable, changing device), +- **Read/Write** permission variables adds a callback function to the bottom of your code. This function executes whenever the variable changes, +- the `ArduinoCloud.update()` function synchronises data between the board and cloud. +- if we update the `test` variable in the sketch, if it is connected to the cloud, we will see the change there as well. + +### Compile & Upload + +When our sketch is ready, we can **compile & upload** our sketch to our board. This process can take some time, depending on how large your sketch is. + +1. First make sure that you have the [Create Agent](https://create.arduino.cc/getting-started/plugin/welcome) installed. This allows Arduino Cloud to communicate with your board in the web interface. +2. Check that your board is connected and visible in the board selection menu. +3. Click the verify/upload button. +4. Wait until the code has successfully been uploaded. +5. Open the serial monitor tool to check for debug messages. If your board is failing to connect, it will print the errors here. + +### Verify Connection + +After a complete upload, you can verify the connection by checking the Thing interface. Here you can see the latest value & time stamp, as well as your device status (online/offline). + +In this case, we have just a single boolean variable named `test`, which is used to switch the state of the built-in LED. + +To control the state of the `test` variable, we can setup a **dashboard** and a **switch widget**. This will allow us to control the LED remotely. + +1. Go to **Dashboards**, and create a new dashboard. +2. Click on the edit button at the top left, then on the **"Add"** button. Select the Thing you want to associate it with, and then click on **"Create Widgets"**. +3. A switch widget will have generated, which is now linked to your board. Flicking it should control the state of the LED (on/off). + +![Dashboard in the Arduino Cloud.](assets/dashboard.png) + +***You can find more details in the [dashboards documentation](/arduino-cloud/cloud-interface/dashboard-widgets).*** \ No newline at end of file diff --git a/content/arduino-cloud/01.guides/02.arduino-c/assets/dashboard.png b/content/arduino-cloud/01.guides/02.arduino-c/assets/dashboard.png new file mode 100644 index 0000000000..9fa55a68c7 Binary files /dev/null and b/content/arduino-cloud/01.guides/02.arduino-c/assets/dashboard.png differ diff --git a/content/arduino-cloud/01.guides/02.arduino-c/assets/esp32-only.png b/content/arduino-cloud/01.guides/02.arduino-c/assets/esp32-only.png new file mode 100644 index 0000000000..3b3bcdcc87 Binary files /dev/null and b/content/arduino-cloud/01.guides/02.arduino-c/assets/esp32-only.png differ diff --git a/content/arduino-cloud/01.guides/02.arduino-c/assets/thing-config.png b/content/arduino-cloud/01.guides/02.arduino-c/assets/thing-config.png new file mode 100644 index 0000000000..b444113248 Binary files /dev/null and b/content/arduino-cloud/01.guides/02.arduino-c/assets/thing-config.png differ diff --git a/content/arduino-cloud/01.guides/03.esp32/assets/dashboard.png b/content/arduino-cloud/01.guides/03.esp32/assets/dashboard.png new file mode 100644 index 0000000000..0fa02680c0 Binary files /dev/null and b/content/arduino-cloud/01.guides/03.esp32/assets/dashboard.png differ diff --git a/content/arduino-cloud/01.guides/03.esp32/assets/esp32-only.png b/content/arduino-cloud/01.guides/03.esp32/assets/esp32-only.png new file mode 100644 index 0000000000..3b3bcdcc87 Binary files /dev/null and b/content/arduino-cloud/01.guides/03.esp32/assets/esp32-only.png differ diff --git a/content/arduino-cloud/01.guides/03.esp32/assets/thing-config.png b/content/arduino-cloud/01.guides/03.esp32/assets/thing-config.png new file mode 100644 index 0000000000..b444113248 Binary files /dev/null and b/content/arduino-cloud/01.guides/03.esp32/assets/thing-config.png differ diff --git a/content/arduino-cloud/01.guides/03.esp32/esp32.md b/content/arduino-cloud/01.guides/03.esp32/esp32.md new file mode 100644 index 0000000000..b0448f3d6c --- /dev/null +++ b/content/arduino-cloud/01.guides/03.esp32/esp32.md @@ -0,0 +1,123 @@ +--- +title: ESP32 / ESP8266 +description: Learn how to set up ESP32/ESP8266 based boards in the Arduino Cloud. +tags: [ESP32, ESP8266, Arduino Cloud] +author: Karl Söderby +--- + +Arduino Cloud supports a wide range of ESP32 / ESP8266 based development boards. The ESP chips are great for any IoT project, and they can be programmed using the Arduino language (C++). + +Setting up ESP based boards in the Arduino Cloud is quick and simple. It is done by generating a **Device ID** and **Secret Key**, which together with your Wi-Fi® credentials is enough to connect to the Arduino Cloud. + +This guide will show you how to set up a generic ESP32/ESP8266 board to communicate with the Arduino Cloud. + +***The official guide for connecting to Arduino Cloud using the C++ environment is found [here](/arduino-cloud/guides/arduino-c). This article is specifically for connecting ESP32/ESP8266 development boards.*** + +## Requirements + +For this guide, you will need to have a registered account at Arduino. Register through the link below: +- [Create an Arduino account](https://login.arduino.cc/login) + +You will also need a **ESP32 or ESP8266** development board. + +***ESP32 and ESP8266 boards are third-party boards. Arduino Cloud supports the both variations but cannot guarantee that certain boards based on these SoCs work. A list of tested and officially supported development boards can be found at [here](/arduino-cloud/hardware/wifi#list-of-supported-boards).*** + +## Setup + +In this section, we will go through the steps necessary to connect your ESP32 board to the Arduino Cloud. To follow these steps, please make sure you have a [registered Arduino account](https://login.arduino.cc/login), and that you have access to the [Arduino Cloud](app.arduino.cc). + +### Configure Device + +First navigate to [Arduino Cloud - Devices](app.arduino.cc/devices). Here you can see all your devices, and configure a new one. + +1. Click on **"Add Device"** +2. Select **"Third Party Device"** +3. Choose your board from the list (if not there, choose e.g. `ESP32S3 Dev Board`). +4. Name your board, e.g. `Device_ESP32_LivingRoom`. +5. Save your **Device ID** and **Secret Key**. This will be used to connect to the Arduino Cloud. + +***More details on this step is available in the [Setup ESP32/ESP8266 devices.](#setup-esp32esp8266-boards)*** + +### Configure Thing + +Next, navigate to the **Things** tab. Here you will see a list of your Things, and a button to create a new one. When you create a new Thing, you will open up a new configuration space. + +![Arduino Cloud Thing Interface](assets/thing-config.png) + +A "Thing" is a virtual twin of your hardware, and it is here that we create variables that we want to synchronize between the cloud and board. Any changes we make here will be reflected in an [automatically generated sketch](/arduino-cloud/cloud-interface/sketches#iot-sketches). + +1. First, let's attach the device we want to use, by clicking the **"Select Device"** button in the **"Associated Devices"** section to the right. +2. let's create a new variable, call it `test`, and select it to be a `boolean` type and with a **read/write** permission. +3. finally, configure your network in the **Network** section. Here you will enter your Wi-Fi® credentials, and your **Secret Key**, obtained when configuring your device. + +![Enter network credentials.](assets/esp32-only.png) + +All the above configurations have now been generated into a set of files that can be accessed in the **Sketch** tab. + +***For more details, see the [documentation for Things](/arduino-cloud/cloud-interface/things).*** + +The automatically generated sketch is now available to be edited. This sketch includes all necessities to connect to the cloud, and has a callback function generated for each **read/write** variable. + +Below is a sketch generated for a single `boolean` variable called `test`. We modified it to turn on/off the built-in LED of the board anytime the `test` bool is `true`. + +```arduino +#include "thingProperties.h" + +void setup() { + pinMode(LED_BUILTIN, OUTPUT); + + Serial.begin(9600); + delay(1500); + + initProperties(); + + ArduinoCloud.begin(ArduinoIoTPreferredConnection); + + setDebugMessageLevel(2); + ArduinoCloud.printDebugInfo(); +} + +void loop() { + ArduinoCloud.update(); +} + +void onTestChange() { + if(test){ + digitalWrite(LED_BUILTIN, HIGH); + } + else{ + digitalWrite(LED_BUILTIN, LOW); + } +} +``` + +- The sketch is automatically updated whenever you change your Thing (e.g. adding a variable, changing device), +- **Read/Write** permission variables adds a callback function to the bottom of your code. This function executes whenever the variable changes, +- the `ArduinoCloud.update()` function synchronises data between the board and cloud. +- if we update the `test` variable in the sketch, if it is connected to the cloud, we will see the change there as well. + +### Compile & Upload + +When our sketch is ready, we can **compile & upload** our sketch to our board. This process can take some time, depending on how large your sketch is. + +1. First make sure that you have the [Create Agent](https://create.arduino.cc/getting-started/plugin/welcome) installed. This allows Arduino Cloud to communicate with your board in the web interface. +2. Check that your board is connected and visible in the board selection menu. +3. Click the verify/upload button. +4. Wait until the code has successfully been uploaded. +5. Open the serial monitor tool to check for debug messages. If your board is failing to connect, it will print the errors here. + +### Verify Connection + +After a complete upload, you can verify the connection by checking the Thing interface. Here you can see the latest value & time stamp, as well as your device status (online/offline). + +In this case, we have just a single boolean variable named `test`, which is used to switch the state of the built-in LED. + +To control the state of the `test` variable, we can setup a **dashboard** and a **switch widget**. This will allow us to control the LED remotely. + +1. Go to **Dashboards**, and create a new dashboard. +2. Click on the edit button at the top left, then on the **"Add"** button. Select the Thing you want to associate it with, and then click on **"Create Widgets"**. +3. A switch widget will have generated, which is now linked to your board. Flicking it should control the state of the LED (on/off). + +![Dashboard in the Arduino Cloud.](assets/dashboard.png) + +***You can find more details in the [dashboards documentation](/arduino-cloud/cloud-interface/dashboard-widgets).*** \ No newline at end of file diff --git a/content/arduino-cloud/01.guides/04.micropython/assets/dashboard.png b/content/arduino-cloud/01.guides/04.micropython/assets/dashboard.png new file mode 100644 index 0000000000..9999596938 Binary files /dev/null and b/content/arduino-cloud/01.guides/04.micropython/assets/dashboard.png differ diff --git a/content/arduino-cloud/01.guides/04.micropython/assets/device-key.png b/content/arduino-cloud/01.guides/04.micropython/assets/device-key.png new file mode 100644 index 0000000000..1ef74de73f Binary files /dev/null and b/content/arduino-cloud/01.guides/04.micropython/assets/device-key.png differ diff --git a/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/set-device-name.png b/content/arduino-cloud/01.guides/04.micropython/assets/set-device-name.png similarity index 100% rename from content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/set-device-name.png rename to content/arduino-cloud/01.guides/04.micropython/assets/set-device-name.png diff --git a/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/setup-device-prompt.png b/content/arduino-cloud/01.guides/04.micropython/assets/setup-device-prompt.png similarity index 100% rename from content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/assets/setup-device-prompt.png rename to content/arduino-cloud/01.guides/04.micropython/assets/setup-device-prompt.png diff --git a/content/arduino-cloud/01.guides/04.micropython/assets/thing.png b/content/arduino-cloud/01.guides/04.micropython/assets/thing.png new file mode 100644 index 0000000000..3dfbd3f472 Binary files /dev/null and b/content/arduino-cloud/01.guides/04.micropython/assets/thing.png differ diff --git a/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/content.md b/content/arduino-cloud/01.guides/04.micropython/content.md similarity index 51% rename from content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/content.md rename to content/arduino-cloud/01.guides/04.micropython/content.md index 08d13f1112..a80b0d82a0 100644 --- a/content/arduino-cloud/01.getting-started/10.iot-cloud-micropython/content.md +++ b/content/arduino-cloud/01.guides/04.micropython/content.md @@ -1,7 +1,8 @@ --- -title: 'Connecting to Arduino IoT Cloud using MicroPython' -description: 'Learn how to use the MicroPython library to connect to the Arduino IoT Cloud and control an LED.' +title: 'MicroPython' +description: 'Learn how to connect to the Arduino Cloud using MicroPython.' tags: + - Arduino Cloud - IoT - MicroPython author: 'Sebastian Romero' @@ -12,50 +13,88 @@ libraries: ## Introduction -This tutorial guides you on how to use the MicroPython library to connect your Arduino device to the Arduino IoT Cloud. +This tutorial guides you on how to use the MicroPython library to connect your Arduino device to the Arduino Cloud. + +It requires your board to have a version of MicroPython installed, which is covered in [this article](/micropython/basics/board-installation). + +To find our full MicroPython documentation, head over to the [MicroPython Docs](/micropython) page. ## Goals The goals of this tutorial are: - Connect your Arduino device to your Wi-Fi® network. -- Connect your Arduino device to the Arduino IoT Cloud. -- Control an LED using the Arduino IoT Cloud. +- Connect your Arduino device to the Arduino Cloud via MicroPython. +- Control an LED using the Arduino Cloud. ## Hardware & Software Needed - [Arduino Lab for MicroPython](https://labs.arduino.cc/en/labs/micropython) - [Arduino GIGA R1 WiFi](/hardware/giga-r1-wifi) or [Portenta H7](/hardware/portenta-h7) -- MicroPython >= 1.2 installed on your Arduino device (download firmware [here](/micropython/#firmware)). +- [Nano ESP32](https://store.arduino.cc/products/nano-esp32) +- MicroPython >= 1.2 installed on your Arduino device. + +***To install MicroPython, read the [MicroPython Installation Guide](https://docs.arduino.cc/micropython/basics/board-installation) written for all Arduino boards.*** + +## Cloud Setup + +Before we start, make sure you have MicroPython installed on your board. If you haven't you can follow [this tutorial](https://docs.arduino.cc/micropython/basics/board-installation). + +Then, we need to configure a Thing in the [Arduino Cloud](app.arduino.cc/things) consisting of two boolean variables called `led` and `ledSwitch`. Follow the instructions below to do so. + +### Thing & Device Configuration + +1. Create a new Thing, by clicking on the **"Create Thing"** button. +2. Click on the **"Select Device"** in the **"Associated Devices"** section of your Thing. +3. Click on **"Set Up New Device"**, and select the bottom category (**"Manual Device"**). Click continue in the next window, and choose a name for your device. +4. Finally, you will see a new **Device ID** and a **Secret Key** generate. You can download them as a PDF. Make sure to save it as you cannot access your Secret Key again. + +![Device Key.](assets/device-key.png) + +- Learn more about Things in the [Things documentation](/arduino-cloud/cloud-interface/things) +- Learn more about Devices in the [Devices documentation](/arduino-cloud/hardware/devices) + +### Create Variables +Next step is to create some cloud variables, which we will later interact with via a MicroPython script. +1. While in Thing configuration, click on **"Add Variable"** which will open a new window. +2. Name your variable `led` and select it to be of an `boolean` type. +3. Click on **"Add Variable"** at the bottom of the window. +4. Create another variable, name it `ledSwitch` and select it to be `int` type. -## Setting Up Your Device and IoT Cloud +You should now have **two variables**: +- `led` - boolean +- `ledSwitch` - boolean -Before we start, make sure you have MicroPython installed on your board. If you haven't you can follow [this tutorial](https://docs.arduino.cc/micropython/basics/board-installation). Then configure a Thing in the [Arduino IoT Cloud](https://create.arduino.cc/iot/) consisting of two boolean variables called `led` and `ledSwitch`. To set up a Thing and a corresponding dashboard, please follow these two tutorials: +It is important that they are named exactly like this, as we will be using them in the example script of this guide. -- [IoT Cloud Variables](https://docs.arduino.cc/arduino-cloud/getting-started/cloud-variables) -- [IoT Cloud Dashboards & Widgets](https://docs.arduino.cc/arduino-cloud/getting-started/dashboard-widgets) +Your Thing should look something like this when you are finished: -The resulting Thing and dashboard should look similar to the following: +![Finished Thing interface.](assets/thing.png) -![Thing with two boolean variables.](./assets/thing.png) +***Learn more about how variables work in the [Variables documentation](/arduino-cloud/cloud-interface/variables)*** -![Dashboard with an LED and a Switch widget.](./assets/dashboard.png) +### Create Dashboard -Also, your device needs to be registered. Follow the flow "Any Device" ("Manual") when clicking **Add** in the "Devices" tab. +When finished with creating your Thing, we also need to create a dashboard, a tool to monitor & interact with the cloud variables. -![Dialog prompting to select setup flow](./assets/setup-device-prompt.png) +1. Go to the [dashboards](app.arduino.cc/dashboards) section, and **create a new dashboard.** +2. In the dashboard, first create a **LED** widget, and link it to the `led` variable we created earlier. +3. Create a **Switch** widget, and link it to `ledSwitch`. +4. You should now have two widgets, looking something like the image below: -Give your board the desired name. +![Dashboard with LED & Switch widgets.](assets/dashboard.png) -![Give your device a name of your choice.](./assets/set-device-name.png) +We are now finished with the Arduino Cloud configuration, and we can proceed with the MicroPython setup. -Eventually write down the Device ID / Secret Key pair that you will need to connect your device to Arduino IoT Cloud. +## MicroPython Setup -![The connection credentials to be written down.](./assets/get-key.png) +In this section, we will install the [Arduino IoT Cloud Python](https://pypi.org/project/arduino-iot-cloud/) library on the Arduino board, and run a script that synchronizes the board with the Arduino Cloud. -You will obtain a pair of device id and device key after registration. Store these details, along with your Wi-Fi® credentials, in a `secrets.py` file. Here is an example of how `secrets.py` should look like: +### Create Secret.py File + +During the [device configuration](#thing--device-configuration), you obtained a **device ID** and **secret key**. These details can be stored, along with your Wi-Fi® credentials, in a `secrets.py` file. Here is an example of how `secrets.py` should look like: ```python WIFI_SSID = "myNetwork" # Network SSID @@ -64,15 +103,13 @@ DEVICE_ID = b"ef77wer88-0432-4574-85e1-54e3d5cac861" CLOUD_PASSWORD = b"TQHFHEKKKLSYMPB1OZLF" ``` -This file should be copied over to the flash drive that mounts when MicroPython boots. To do so you can use the file manager tool in Arduino Lab for MicroPython or drag & drop the file manually. Please note that the latter option is not recommended as the file system can potentially get corrupted when copying files manually. - -After configuring your device, **assign** it to the thing that you created previously. This gives access permission to the registered board. - +In a MicroPython editor, you can create this file, and save it on your board running MicroPython. +This file should be copied over to the flash drive that mounts when MicroPython boots. To do so you can use the file manager tool in Arduino Lab for MicroPython. Please note that the latter option is not recommended as the file system can potentially get corrupted when copying files manually. -## Installing The Library +### Install Cloud Library -To install the Arduino IoT Cloud (Micro)Python library on your board, you can use thy Python based tool `mpremote`. This requires Python to be installed. On macOS and Linux Python usually comes pre-installed. If it's not installed on your system you may download it from [here](https://www.python.org/downloads/). Then, to install `mpremote` you can use pip: +To install the Arduino Cloud (Micro)Python library on your board, you can use the Python based tool `mpremote`. This requires Python to be installed. On macOS and Linux Python usually comes pre-installed. If it's not installed on your system you may download it from [here](https://www.python.org/downloads/). Then, to install `mpremote` you can use pip: ```bash $ pip install mpremote @@ -93,6 +130,8 @@ $ mpremote connect id:335B34603532 mip install github:arduino/arduino-iot-cloud- This will install the library and all required dependencies on the board. Another option is to manually copy the files from the library's [repository](https://github.com/arduino/arduino-iot-cloud-py/tree/main/src/arduino_iot_cloud) to the board's file system. It's good practice to put those files into a folder called `lib` to have the files organized neatly. +For more options on how to install libraries on your board, check out our [Installing Modules Guide](/micropython/basics/installing-modules). + ## Programming the Board Here is the example code to copy and paste into your sketch. It connects your device @@ -169,13 +208,9 @@ if __name__ == "__main__": - `on_switch_changed` - Is the callback that gets executed when the `ledSwitch` variable is changed by toggling the switch on the cloud dashboard. This function in turn toggles the on-board LED and updates the cloud variable `led` that reflects the state of the on-board LED to be displayed in the cloud dashboard. - `client.start()` - Enters a loop that runs as long as the board is connected to the cloud and synchronises data as it runs. - - ## Testing It Out -Open Arduino Lab for MicroPython and connect to your board. Pasting the above code and run the script. Then open your Arduino IoT Cloud dashboard. You should see the registered "ledSwitch" and "led" widgets. Toggle the "ledSwitch", and the LED on your Arduino board should light up accordingly. The state of the "led" variable should also change, mirroring the state of the physical LED. - - +Open Arduino Lab for MicroPython and connect to your board. Pasting the above code and run the script. Then open your Arduino Cloud dashboard. You should see the registered "ledSwitch" and "led" widgets. Toggle the "ledSwitch", and the LED on your Arduino board should light up accordingly. The state of the "led" variable should also change, mirroring the state of the physical LED. ## Troubleshoot @@ -183,11 +218,9 @@ If the code is not working, there are some common issues we can troubleshoot: - Make sure MicroPython >= 1.2 is installed on your board. - Check the Wi-Fi® credentials in the `secrets.py` file. -- Ensure the device ID and Cloud password in the `secrets.py` file match with what is registered on the IoT Cloud. -- Make sure your IoT Cloud Thing is correctly set up and your device is assigned to it. - - +- Ensure the device ID and Cloud password in the `secrets.py` file match with what is registered on the Arduino Cloud. +- Make sure your Arduino Cloud Thing is correctly set up and your device is assigned to it. ## Conclusion -This tutorial has guided you through the process of connecting your Arduino device to the Arduino IoT Cloud using MicroPython. You learned how to install the necessary library, set up your device, and control an LED via the IoT Cloud. This opens up possibilities for more complex applications, as you can control and monitor your Arduino device remotely. \ No newline at end of file +This tutorial has guided you through the process of connecting your Arduino device to the Arduino Cloud using MicroPython. You learned how to install the necessary library, set up your device, and control an LED via the Arduino Cloud. This opens up possibilities for more complex applications, as you can control and monitor your Arduino device remotely. \ No newline at end of file diff --git a/content/arduino-cloud/01.guides/05.python/assets/device-key.png b/content/arduino-cloud/01.guides/05.python/assets/device-key.png new file mode 100644 index 0000000000..1ef74de73f Binary files /dev/null and b/content/arduino-cloud/01.guides/05.python/assets/device-key.png differ diff --git a/content/arduino-cloud/01.guides/05.python/assets/thing.png b/content/arduino-cloud/01.guides/05.python/assets/thing.png new file mode 100644 index 0000000000..20b7404283 Binary files /dev/null and b/content/arduino-cloud/01.guides/05.python/assets/thing.png differ diff --git a/content/arduino-cloud/01.guides/05.python/assets/values.png b/content/arduino-cloud/01.guides/05.python/assets/values.png new file mode 100644 index 0000000000..0f2d2fc1b4 Binary files /dev/null and b/content/arduino-cloud/01.guides/05.python/assets/values.png differ diff --git a/content/arduino-cloud/01.guides/05.python/python.md b/content/arduino-cloud/01.guides/05.python/python.md new file mode 100644 index 0000000000..00761ae788 --- /dev/null +++ b/content/arduino-cloud/01.guides/05.python/python.md @@ -0,0 +1,171 @@ +--- +title: 'Python' +description: 'Learn how to use the Python library to connect to the Arduino Cloud.' +tags: + - IoT + - Python + - Arduino Cloud +author: 'Karl Söderby' +libraries: + - name: Arduino IoT Cloud Python + url: https://github.com/arduino/arduino-iot-cloud-py +--- + +***It is recommended to have some experience with the Python environment before reading this guide. However, installation and setup is covered in the [Python Setup](#python-setup) section.*** + +The [Arduino IoT Cloud Python Client](https://pypi.org/project/arduino-iot-cloud/) is a library that allows you to interact with the Arduino Cloud via MQTT. It supports basic authentication using the **device ID** as well as **secret key** that is obtained from the Arduino Cloud when configuring a manual device. + + +## Overview + +In this guide we will: +- Configure a manual device in the Arduino Cloud, +- install the Arduino IoT Cloud Python library, +- write a Python script that connects to the Arduino Cloud. + +## Requirements + +To follow this guide, make sure to have: + +- An [Arduino account](https://login.arduino.cc/login), +- a version of [Python](https://www.python.org/downloads/) installed, +- [pip](https://packaging.python.org/en/latest/tutorials/installing-packages/) package manager installed, +- [Arduino IoT Python Client](https://pypi.org/project/arduino-iot-client/) installed. +- A code editor (we recommend [VSCode](https://code.visualstudio.com/) with the Python extension installed). + +***The experience with Python and the pip package manager varies depending on your computer and operating system. Python needs to be in your PATH to use the Arduino IoT Cloud Python client.*** + +## Cloud Setup + +To begin with, we need to create a manual device, and create a new [Thing](/arduino-cloud/cloud-interface/things). Navigate to the [Arduino Cloud](app.arduino.cc) and to the **"Things"** tab. + +### Thing & Device Configuration + +1. Create a new Thing, by clicking on the **"Create Thing"** button. +2. Click on the **"Select Device"** in the **"Associated Devices"** section of your Thing. +3. Click on **"Set Up New Device"**, and select the bottom category (**"Manual Device"**). Click continue in the next window, and choose a name for your device. +4. Finally, you will see a new **Device ID** and a **Secret Key** generate. You can download them as a PDF. Make sure to save it as you cannot access your Secret Key again. + +![Device ID & Secret key.](assets/device-key.png) + +- Learn more about Things in the [Things documentation](/arduino-cloud/cloud-interface/things) +- Learn more about Devices in the [Devices documentation](/arduino-cloud/hardware/devices) + +### Create Variables + +Next step is to create some cloud variables, which we will later interact with via a Python script. + +1. While in Thing configuration, click on **"Add Variable"** which will open a new window. +2. Name your variable `test_switch` and select it to be of an `boolean` type. +3. Click on **"Add Variable"** at the bottom of the window. +4. Create another variable, name it `test_value` and select it to be `int` type. + +You should now have **two variables**, `test_switch` and `test_value`. It is important that they are named exactly like this, as we will be using them in the example script of this guide. + +![Complete Thing.](assets/thing.png) + +- Learn more about how variables work in the [Variables documentation](/arduino-cloud/cloud-interface/variables) + +***Variables that we create here can also be synchronized with variables running on any other device in the platform. This makes it possible to link an Arduino boards with a Python or JavaScript project without writing any connection code!*** + +## Python Setup + +Before continuing, make sure you have a version of [Python](https://www.python.org/downloads/) installed. You can check this by opening a terminal and running: + +``` +python --version +python3 --version +``` + +### Install Packages + +To install the Arduino IoT Cloud Python client, run the following command: + +``` +pip install arduino-iot-cloud +``` + +You will also need to install the [swig](https://pypi.org/project/swig/) package. + +``` +pip install swig +``` + +To test out to see if your installation worked correctly, start the Python interpreter in your terminal by typing `python`, once running, test out this command: + +```python +from arduino_iot_cloud import ArduinoCloudClient +``` + +If you don't receive any import error, it means it is accessible and we can move on to testing out the example script. + +### Example Script + +The script below creates a client that connects to the Arduino Cloud and synchronizes the variable values. Make sure to enter your device credentials (see [Cloud Setup](#cloud-setup)) in the `DEVICE_ID` and `SECRET_KEY` variables. + +Create a python file, and name it something appropriate, such as `cloud_first_test.py`, and copy the contents of the code snippet below into it. + +```python +import time +import logging + +import sys +sys.path.append("lib") + +from arduino_iot_cloud import ArduinoCloudClient + +DEVICE_ID = b"YOUR_DEVICE_ID" +SECRET_KEY = b"YOUR_SECRET_KEY" + +def logging_func(): + logging.basicConfig( + datefmt="%H:%M:%S", + format="%(asctime)s.%(msecs)03d %(message)s", + level=logging.INFO, + ) + +# This function is executed each time the "ledSwitch" variable changes +def on_switch_changed(client, value): + print("Switch Pressed! Status is: ", value) + +if __name__ == "__main__": + + logging_func() + client = ArduinoCloudClient(device_id=DEVICE_ID, username=DEVICE_ID, password=SECRET_KEY) + + client.register("test_value") + client["test_value"] = 20 + client.register("test_switch", value=None, on_write=on_switch_changed) + + client.start() +``` + +- The script uses the `client.register()` to configure the variables. +- The `test_value` we simply set a static value of `20`. +- For the `test_switch` variable, we create a callback function that is triggered any time the value is updated. This can be controlled from a dashboard in the Arduino Cloud. + +To run this script, use the following command (or the "Run" button in VSCode): + +```python +python cloud_first_test.py +``` + +After running the script, you should see in the terminal that we first attempt to connect to the Arduino Cloud. Once connected, we push the variable update for `test_value`. You should now see this value updated in the Thing interface in the Arduino Cloud. + +![Value updated in the Arduino Cloud](assets/values.png) + +You can test out the `test_switch` variable by creating a dashboard in the Arduino Cloud with a switch widget linked to the variable. + +When flicking the switch, you should see the following command being printed in the terminal: + +``` +Switch Pressed! Status is +``` + +For creating dashboards and linking variables, check out the [Dashboard & Widgets documentation](/arduino-cloud/cloud-interface/dashboard-widgets). + +### Troubleshooting + +- `command not found: python` - encountering this error when running a script indicates that the terminal can't access Python. You can try running `python3`, as some versions of Python requires this. +- `Connection failed 5, retrying after 1.0s` - this error is likely due to an invalid **device ID** or **secret key**. +- `ModuleNotFoundError: No module named '_m2crypto'` - likely if you are running an older version of the library. Try updating the library. \ No newline at end of file diff --git a/content/arduino-cloud/01.guides/06.javascript/assets/device-key.png b/content/arduino-cloud/01.guides/06.javascript/assets/device-key.png new file mode 100644 index 0000000000..1ef74de73f Binary files /dev/null and b/content/arduino-cloud/01.guides/06.javascript/assets/device-key.png differ diff --git a/content/arduino-cloud/01.guides/06.javascript/assets/test_value.png b/content/arduino-cloud/01.guides/06.javascript/assets/test_value.png new file mode 100644 index 0000000000..bc5c488e5d Binary files /dev/null and b/content/arduino-cloud/01.guides/06.javascript/assets/test_value.png differ diff --git a/content/arduino-cloud/01.guides/06.javascript/assets/thing.png b/content/arduino-cloud/01.guides/06.javascript/assets/thing.png new file mode 100644 index 0000000000..3d5f3d0531 Binary files /dev/null and b/content/arduino-cloud/01.guides/06.javascript/assets/thing.png differ diff --git a/content/arduino-cloud/01.guides/06.javascript/javascript.md b/content/arduino-cloud/01.guides/06.javascript/javascript.md new file mode 100644 index 0000000000..6ff8a4bb19 --- /dev/null +++ b/content/arduino-cloud/01.guides/06.javascript/javascript.md @@ -0,0 +1,125 @@ +--- +title: 'JavaScript' +description: 'Learn how to connect to the Arduino Cloud via JavaScript (node.js).' +tags: + - IoT + - JavaScript + - Arduino Cloud +author: 'Karl Söderby' +--- + +The [arduino-iot-js](https://www.npmjs.com/package/arduino-iot-js) library allows you to interact with the Arduino Cloud via MQTT. It supports basic authentication using the **device ID** as well as **secret key** that is obtained from the Arduino Cloud when configuring a manual device. + +## Overview + +In this guide we will: +- Configure a manual device in the Arduino Cloud, +- install the **arduino-iot-js** library, +- create a JavaScript example code that connects to the Arduino Cloud. + +## Requirements + +To follow this guide, make sure to have: + +- An [Arduino account](https://login.arduino.cc/login), +- a version of [node.js](https://nodejs.org/en/download/current) installed (confirmed to work with `v16.15.0`), +- [arduino-iot-js](https://www.npmjs.com/package/arduino-iot-js) installed. +- A code editor (we recommend [VSCode](https://code.visualstudio.com/)). + +## Cloud Setup + +To begin with, we need to create a manual device, and create a new [Thing](/arduino-cloud/cloud-interface/things). Navigate to the [Arduino Cloud](app.arduino.cc) and to the **"Things"** tab. + +### Thing & Device Configuration + +1. Create a new Thing, by clicking on the **"Create Thing"** button. +2. Click on the **"Select Device"** in the **"Associated Devices"** section of your Thing. +3. Click on **"Set Up New Device"**, and select the bottom category (**"Manual Device"**). Click continue in the next window, and choose a name for your device. +4. Finally, you will see a new **Device ID** and a **Secret Key** generate. You can download them as a PDF. Make sure to save it as you cannot access your Secret Key again. + +![Device credentials.](assets/device-key.png) + +- Learn more about Things in the [Things documentation](/arduino-cloud/cloud-interface/things) +- Learn more about Devices in the [Devices documentation](/arduino-cloud/hardware/devices) + +### Create Variable + +Next step is to create a cloud variable, which we will later interact with in our JavaScript code. + +1. While in Thing configuration, click on **"Add Variable"** which will open a new window. +2. Name your variable `test_value` and select it to be of an `int` type. +3. Click on **"Add Variable"** at the bottom of the window. + +You should now have a variable named `test_value`. It is important that it is named exactly like this, as we will be using it in the example script of this guide. + +![Complete Thing.](assets/thing.png) + +- Learn more about how variables work in the [Variables documentation](/arduino-cloud/cloud-interface/variables) + +***Variables that we create here can also be synchronized with variables running on any other device in the platform. This makes it possible to link an Arduino boards with a Python or JavaScript project without writing any connection code!*** + +## JavaScript Setup + +Before continuing, make sure you have a version of [node.js](https://nodejs.org/en/download/current) installed. You can check that it is installed by opening a terminal and running: + +``` +node -v +``` + +### Install NPM Package + +The [arduino-iot-js](https://www.npmjs.com/package/arduino-iot-js) library can be installed by running the following command: + +``` +npm install arduino-iot-js +``` + +This will install the library in your current directory. You can check that the library is installed by running `npm list`. + +### Example Script + +Create a file with a `.js` extension, and call it something appropriate such as `cloud_first_test.js`. Note that it needs to be in the same directory as you installed the library. + +Below is a script that connects to the cloud using the **device ID** and **secret key** that we obtained in the [cloud setup](#cloud-setup) section. Copy the contents into your `.js` file. + +```javascript +const { ArduinoIoTCloud } = require('arduino-iot-js'); + +(async () => { + const client = await ArduinoIoTCloud.connect({ + deviceId: 'YOUR_DEVICE_ID', + secretKey: 'YOUR_SECRET_KEY', + onDisconnect: (message) => console.error(message), + }); + + const value = 20; + let cloudVar = "test_value" + + client.sendProperty(cloudVar, value); + console.log(cloudVar, ":", value); + + client.onPropertyValue(cloudVar, (value) => console.log(cloudVar, ":", value)); +})(); +``` + +- `sendProperty(cloudVar, value)` - update a variable in the cloud, +- `onPropertyValue(cloudVar, (value))` - when receiving an update from the Arduino Cloud, updates the `value` variable. + +This example simply sends an update to the Arduino Cloud (updating the value of `test_value` to `20`), and awaits any changes from the cloud. You can ensure it is working by checking your Thing interface as well: + +![Value in the Thing interface](assets/test_value.png) + +You can test out the `test_value` variable by creating a dashboard in the Arduino Cloud with a **value** widget linked to the variable. + +When entering a new number, you should see the following command being printed in the terminal: + +``` +test_value : +``` + +For creating dashboards and linking variables, check out the [Dashboard & Widgets documentation](/arduino-cloud/cloud-interface/dashboard-widgets). + +### Troubleshooting + +- `Error: Cannot find module` - the package is not installed/accessible from your current directory. Double check that your directory is correct and that you have successfully installed the package. +- `Error: connection failed: client not connected` - likely due to wrong credentials (device ID / secret key). Double check these parameters. \ No newline at end of file diff --git a/content/arduino-cloud/02.features/07.nodered/assets/nodered-01.png b/content/arduino-cloud/01.guides/07.node-red/assets/nodered-01.png similarity index 100% rename from content/arduino-cloud/02.features/07.nodered/assets/nodered-01.png rename to content/arduino-cloud/01.guides/07.node-red/assets/nodered-01.png diff --git a/content/arduino-cloud/02.features/07.nodered/assets/nodered-02.gif b/content/arduino-cloud/01.guides/07.node-red/assets/nodered-02.gif similarity index 100% rename from content/arduino-cloud/02.features/07.nodered/assets/nodered-02.gif rename to content/arduino-cloud/01.guides/07.node-red/assets/nodered-02.gif diff --git a/content/arduino-cloud/02.features/07.nodered/assets/nodered-03.gif b/content/arduino-cloud/01.guides/07.node-red/assets/nodered-03.gif similarity index 100% rename from content/arduino-cloud/02.features/07.nodered/assets/nodered-03.gif rename to content/arduino-cloud/01.guides/07.node-red/assets/nodered-03.gif diff --git a/content/arduino-cloud/02.features/07.nodered/assets/nodered-04.gif b/content/arduino-cloud/01.guides/07.node-red/assets/nodered-04.gif similarity index 100% rename from content/arduino-cloud/02.features/07.nodered/assets/nodered-04.gif rename to content/arduino-cloud/01.guides/07.node-red/assets/nodered-04.gif diff --git a/content/arduino-cloud/02.features/07.nodered/assets/nodered-05.gif b/content/arduino-cloud/01.guides/07.node-red/assets/nodered-05.gif similarity index 100% rename from content/arduino-cloud/02.features/07.nodered/assets/nodered-05.gif rename to content/arduino-cloud/01.guides/07.node-red/assets/nodered-05.gif diff --git a/content/arduino-cloud/02.features/07.nodered/assets/nodered-06.gif b/content/arduino-cloud/01.guides/07.node-red/assets/nodered-06.gif similarity index 100% rename from content/arduino-cloud/02.features/07.nodered/assets/nodered-06.gif rename to content/arduino-cloud/01.guides/07.node-red/assets/nodered-06.gif diff --git a/content/arduino-cloud/02.features/07.nodered/assets/nodered-07.gif b/content/arduino-cloud/01.guides/07.node-red/assets/nodered-07.gif similarity index 100% rename from content/arduino-cloud/02.features/07.nodered/assets/nodered-07.gif rename to content/arduino-cloud/01.guides/07.node-red/assets/nodered-07.gif diff --git a/content/arduino-cloud/02.features/07.nodered/assets/nodered-08.png b/content/arduino-cloud/01.guides/07.node-red/assets/nodered-08.png similarity index 100% rename from content/arduino-cloud/02.features/07.nodered/assets/nodered-08.png rename to content/arduino-cloud/01.guides/07.node-red/assets/nodered-08.png diff --git a/content/arduino-cloud/02.features/07.nodered/assets/rednode-09.png b/content/arduino-cloud/01.guides/07.node-red/assets/rednode-09.png similarity index 100% rename from content/arduino-cloud/02.features/07.nodered/assets/rednode-09.png rename to content/arduino-cloud/01.guides/07.node-red/assets/rednode-09.png diff --git a/content/arduino-cloud/02.features/07.nodered/nodered-intro.md b/content/arduino-cloud/01.guides/07.node-red/nodered-intro.md similarity index 71% rename from content/arduino-cloud/02.features/07.nodered/nodered-intro.md rename to content/arduino-cloud/01.guides/07.node-red/nodered-intro.md index 27657bcea3..5feedcd910 100644 --- a/content/arduino-cloud/02.features/07.nodered/nodered-intro.md +++ b/content/arduino-cloud/01.guides/07.node-red/nodered-intro.md @@ -1,11 +1,9 @@ --- -title: 'Node-RED with Arduino IoT Cloud' -compatible-products: [mkr-1000-wifi, mkr-wifi-1010, nano-33-iot, nano-rp2040-connect] -difficulty: advanced -description: 'Learn how to use Node-RED together with the Arduino IoT Cloud to create advanced automation systems.' +title: 'Node-RED' +description: 'Learn how to use Node-RED together with the Arduino Cloud.' tags: - Node-RED - - IoT Cloud + - Arduino Cloud - Automation - IoT author: 'Liam Aljundi' @@ -15,17 +13,17 @@ author: 'Liam Aljundi' Node-RED is a programming tool for connecting hardware devices such as Arduino with other hardware devices, APIs, and online services easily using a web-based flow editor. It allows you to connect those different devices and services by connecting a combination of nodes that create your desired flow. -In this tutorial, we will look into the applications of using Node-RED together with the Arduino IoT Cloud. The integration of the two platforms allows us to facilitate communications between the Arduino IoT Cloud and home automation devices, send and receive data from online services such as Email and SMS, and write JavaScript code to manipulate the data. +In this tutorial, we will look into the applications of using Node-RED together with the Arduino Cloud. The integration of the two platforms allows us to facilitate communications between the Arduino Cloud and home automation devices, send and receive data from online services such as Email and SMS, and write JavaScript code to manipulate the data. -***Note: this tutorial requires a [subscription to the Arduino IoT Cloud](https://cloud.arduino.cc/plans), all three subscriptions (Entry, Maker & Maker Plus) are valid.*** +***Note: this tutorial requires a [subscription to the Arduino Cloud](https://cloud.arduino.cc/plans), all three subscriptions (Entry, Maker & Maker Plus) are valid.*** ## Goals -- Set up Node-RED with the Arduino IoT Cloud. +- Set up Node-RED with the Arduino Cloud. - Use simple Flows with Node-RED. -- Build a Node-RED Flow that pulls data from Arduino IoT Cloud. -- Manipulate data received from the Arduino IoT Cloud using JavaScript code. -- Send email notifications with data from the Arduino IoT Cloud. +- Build a Node-RED Flow that pulls data from Arduino Cloud. +- Manipulate data received from the Arduino Cloud using JavaScript code. +- Send email notifications with data from the Arduino Cloud. ## Hardware & Software Requirements @@ -35,7 +33,7 @@ In this tutorial, we will look into the applications of using Node-RED together For this tutorial, you will need a cloud compatible board. You will find all compatible boards in the link below: -- [Arduino IoT Cloud compatible hardware.](/cloud/iot-cloud/tutorials/iot-cloud-getting-started#compatible-hardware) +- [Arduino Cloud compatible hardware.](/arduino-cloud/hardware/devices#type-of-devices) ## Node-RED Setup @@ -109,7 +107,7 @@ You can run the simple flow shown below using Node-RED's default nodes: Your message should be printed to the console on the right side. -In addition to the default nodes installed in node-RED, you can use the palette manager to install additional nodes that can be useful to creating more advanced flows. Follow the steps below to install the Arduino IoT Cloud nodes using the palette manager: +In addition to the default nodes installed in node-RED, you can use the palette manager to install additional nodes that can be useful to creating more advanced flows. Follow the steps below to install the Arduino Cloud nodes using the palette manager: **1.** Click on the menu in the header bar in the top right corner. @@ -121,9 +119,9 @@ In addition to the default nodes installed in node-RED, you can use the palette **5.** From the results, install **"@arduino/node-red-contrib-arduino-iot-cloud"**. -![Installing the Arduino IoT Cloud Palette](assets/nodered-03.gif) +![Installing the Arduino Cloud Palette](assets/nodered-03.gif) -Now, you should be able to use the Arduino IoT Cloud nodes from the palette on the left side of the editor. There are five IoT Cloud nodes: property in, property out, historic, periodic, and inject. Each of the nodes has a description of its function, which appears when you hover over the node. +Now, you should be able to use the Arduino Cloud nodes from the palette on the left side of the editor. There are five Arduino Cloud nodes: property in, property out, historic, periodic, and inject. Each of the nodes has a description of its function, which appears when you hover over the node. ## Setting Up a Thing @@ -131,7 +129,7 @@ The Thing we will create for this example is quite simple. It is a sketch to rea Follow the steps below to set up the Thing: -- Go to the Arduino IoT Cloud -> Thing -> Create a Thing +- Go to the Arduino Cloud -> Thing -> Create a Thing - Add your Device and your Network credentials - Add an integer Variable, with the name humidity, and set permissions to Read Only - Go to the **"Sketch"** tab and replace the code with the code below: @@ -155,7 +153,7 @@ Follow the steps below to set up the Thing: // Defined in thingProperties.h initProperties(); - // Connect to Arduino IoT Cloud + // Connect to Arduino Cloud ArduinoCloud.begin(ArduinoIoTPreferredConnection); setDebugMessageLevel(2); @@ -175,23 +173,21 @@ Follow the steps below to set up the Thing: ### Circuit -The final step is connecting the **DHT11 humidity sensor** to our Arduino MKR Wi-Fi 1010 board, as shown in the image below. You can also freely use any other [IoT Cloud compatible board](/cloud/iot-cloud/tutorials/iot-cloud-getting-started#compatible-hardware) and a different sensor. +The final step is connecting the **DHT11 humidity sensor** to our Arduino MKR Wi-Fi 1010 board, as shown in the image below. You can also freely use any other [Arduino Cloud compatible board](/arduino-cloud/hardware/devices#type-of-devices) and a different sensor. ![Connecting the DHT11 Sensor.](assets/rednode-09.png) ## Communicating with Node-RED -Use the steps below to use Node-RED with the Arduino IoT Cloud: +Use the steps below to use Node-RED with the Arduino Cloud: -![Obtaining API Key](assets/nodered-04.gif) - -**1.** Go to the Arduino IoT Cloud -> Integrations -> Create API Key +**1.** Go to the [API keys section](app.arduino.cc/home/api-keys), and create a new API key. **2.** Save the Client ID and Client Secret in a safe document **3.** Go to Node-RED web page at [http://localhost:1880](http://localhost:1880) -**4.** Add the Arduino IoT Cloud "**property out**" node from the palette menu on the left side +**4.** Add the Arduino Cloud "**property out**" node from the palette menu on the left side **5.** Double click on the node -> select "Add new Arduino-connection" @@ -205,11 +201,11 @@ Use the steps below to use Node-RED with the Arduino IoT Cloud: ### Creating a Flow -Now that you have a node pulling data from the Arduino IoT Cloud, you need to use the *Inject* node in order to manipulate and send the data. All you need to do is dragging the *Inject* node and connect it to the property out node, then double-clicking on the inject node to ensure that the right Thing and property are selected. +Now that you have a node pulling data from the Arduino Cloud, you need to use the *Inject* node in order to manipulate and send the data. All you need to do is dragging the *Inject* node and connect it to the property out node, then double-clicking on the inject node to ensure that the right Thing and property are selected. -Finally, we will add a debug node from the top of the palette menu, to print the values coming from the Arduino IoT Cloud into the console. You will now be able to see the values from the humidity sensor printed into the Node-RED console. +Finally, we will add a debug node from the top of the palette menu, to print the values coming from the Arduino Cloud into the console. You will now be able to see the values from the humidity sensor printed into the Node-RED console. -The next step is adding a **function node** that processes the data coming from the Arduino IoT Cloud. This node is important when working with a constant flow of data, as it allows you to use JavaScript code to create customized triggers from the received values. After dragging the function node into the editor, double-click on the node and select **"on message"** tab, then insert the code below: +The next step is adding a **function node** that processes the data coming from the Arduino Cloud. This node is important when working with a constant flow of data, as it allows you to use JavaScript code to create customized triggers from the received values. After dragging the function node into the editor, double-click on the node and select **"on message"** tab, then insert the code below: ```js let data = msg.payload; @@ -237,7 +233,7 @@ This code will only send values when they are above 60, or when they change back ### Sending Email Notifications -Now that you are able to pull and manipulate data from the Arduino IoT Cloud, it's time to use this data. In this example, we will show how to send alarm notifications to your email, using the Arduino IoT Cloud. To achieve this, we need to add an email nodes following the steps below: +Now that you are able to pull and manipulate data from the Arduino Cloud, it's time to use this data. In this example, we will show how to send alarm notifications to your email, using the Arduino Cloud. To achieve this, we need to add an email nodes following the steps below: - Click on the menu in the header bar in the top right corner. - Select **"Manage palette"**. @@ -249,8 +245,8 @@ Next, drag the email node from the palette menu on the left side into the editor ![Email node](./assets/nodered-08.png) -Now, all you need to do is replace the debug node with the email node to receive email notifications with the humidity data received from the Arduino IoT Cloud. You can customize the emails using the function node if you wish. +Now, all you need to do is replace the debug node with the email node to receive email notifications with the humidity data received from the Arduino Cloud. You can customize the emails using the function node if you wish. ## Further Applications -In this tutorial we demonstrated how you can use the [Arduino IoT Cloud](https://create.arduino.cc/iot/) together with [Node-RED](https://nodered.org/) to build a more complex automation applications. The email notification is only one of the many different use cases, other applications can be creating communication between the Arduino IoT Cloud to other home automation devices, sending customized SMS and WhatsApp messages, and many more. +In this tutorial we demonstrated how you can use the [Arduino Cloud](app.arduino.cc) together with [Node-RED](https://nodered.org/) to build a more complex automation applications. The email notification is only one of the many different use cases, other applications can be creating communication between the Arduino Cloud to other home automation devices, sending customized SMS and WhatsApp messages, and many more. diff --git a/content/arduino-cloud/01.guides/08.alexa/alexa.md b/content/arduino-cloud/01.guides/08.alexa/alexa.md new file mode 100644 index 0000000000..2a48aba349 --- /dev/null +++ b/content/arduino-cloud/01.guides/08.alexa/alexa.md @@ -0,0 +1,172 @@ +--- +title: 'Alexa' +description: 'Learn how to connect the Arduino Cloud with the Amazon Alexa service.' +tags: +- Amazon Alexa +author: 'Karl Söderby' +featuredImage: 'cloud' +--- + +## Introduction + + + +In this tutorial you will learn how to integrate the [Arduino Cloud](app.arduino.cc) with the [Amazon Alexa skill](https://www.amazon.com/Arduino-LLC/dp/B07ZT2PK2H). At the end of this tutorial, we will be able to change the color of an RGB matrix connected to your Arduino, using only voice commands in the Alexa app. + +![The Alexa and Arduino Cloud integration.](assets/alexa-mkr-rgb-shield-img-08.png) + +This tutorial focuses on using the [MKR RGB Shield](https://store.arduino.cc/products/arduino-mkr-rgb-shield) but can easily be modified to use any other RGB pixels / matrices. + +***You can also find all variables that can be synchronized between Arduino Cloud and Alexa in the [Cloud Variables guide](/arduino-cloud/getting-started/cloud-variables#alexa-variables).*** + +## Goals + +The goals of this project are: + +- Set up the Arduino Cloud. +- Create a program that controls the RGB pixels. +- Install the Arduino Skill on the Alexa app. +- Sync the Arduino Cloud with Alexa. + +## Hardware & Software Needed + +- [Arduino Cloud](app.arduino.cc) +- [Amazon Alexa skill](https://www.amazon.com/Arduino-LLC/dp/B07ZT2PK2H) +- \*[Arduino MKR WiFi 1010](https://store.arduino.cc/mkr-wifi-1010). +- \*[MKR RGB Shield](https://store.arduino.cc/arduino-mkr-rgb-shield) or other RGB matrices. + +***\*You can use any supported Wi-Fi® board in this tutorial, but the example provided is made specifically for the MKR WiFi 1010 + MKR RGB Shield.*** + +## Circuit + +Simply mount the MKR RGB Shield on top of the MKR WiFi 1010. + +![Mounting the shield.](assets/alexa-mkr-rgb-shield-img-01.png) + +## Cloud Setup + +To set up the cloud, you will need to: +1. Log in to the [Arduino Cloud](https://login.arduino.cc/login). +2. Go to **"Things"** and create a new Thing. +3. Select and attach the device you want to use (or configure a new one). +4. Create a variable called `LoungeArea` and select it to be of a **colored light** type. This is the variable that will be used to store incoming data from the Alexa service. + +***If you are new to the Arduino Cloud, visit the [Arduino / C++ Setup Guide](/arduino-cloud/guides/arduino-c) which has detailed instructions on how to set up devices, configuring Things and more.*** + +### Example Sketch + +With all configurations done, we can move onto creating the program. By clicking on the **"Sketch"** tab, we can start editing the code that we will upload to our device. + +First we need to include two libraries called `ArduinoGraphics` and `Arduino_MKRRGB`. These will help us control the MKR RGB Shield. If you are using any other matrix or RGB pixel, you will need to adjust this example. + +When we later on will be connecting the cloud to Alexa, the data will be received directly from the Alexa app. Whenever the data updates, the `onLoungeAreaChange()` will execute, where it will fetch the data from Alexa (the RGB values) and display them on the RGB matrix. You can find the full code in the snippet below. + +```arduino +#include +#include +#include "thingProperties.h" + +void setup() { + Serial.begin(9600); + delay(1500); + + MATRIX.begin(); + MATRIX.brightness(10); + + initProperties(); + + ArduinoCloud.begin(ArduinoIoTPreferredConnection); + + setDebugMessageLevel(2); + ArduinoCloud.printDebugInfo(); +} + +void loop() { + ArduinoCloud.update(); + // No code required in the loop for this setup +} + + +void onLoungeAreaChange() { + uint8_t r, g, b; + loungeArea.getValue().getRGB(r, g, b); + if (loungeArea.getSwitch()) { + Serial.println("R:" + String(r) + " G:" + String(g) + " B:" + String(b)); //prints the current R, G, B values + MATRIX.beginDraw(); //starts a new "drawing" on the RGB shield's pixels + MATRIX.clear(); //clears the RGB shield's pixels + MATRIX.noStroke(); + MATRIX.fill(r, g, b); //the r, g, b values are fed into the shield's pixels + MATRIX.rect(0, 0, MATRIX.width(), MATRIX.height()); //creates a rectangle (this covers the entire matrix) + MATRIX.endDraw(); // ends the draw, and displays the new "drawing" + + } else { + Serial.println("Lamp Off"); + //the following code simply turns everything off + MATRIX.beginDraw(); + MATRIX.clear(); + MATRIX.noStroke(); + MATRIX.fill(0, 0, 0); + MATRIX.rect(0, 0, MATRIX.width(), MATRIX.height()); + MATRIX.endDraw(); + } +} +``` + +Upload the code in the snippet above to your board. You can check the Serial Monitor to make sure you have successfully connected to the Arduino Cloud. + +We can now move on to the next step: **setting up Alexa.** + +## Alexa Setup + +For this step, we will need the Amazon Alexa app which can be downloaded from the [Apple App Store](https://apps.apple.com/us/app/amazon-alexa/id944011620) or the [Google Play Store](https://play.google.com/store/apps/details?id=com.amazon.dee.app&hl=en). Once installed, login with your existing account or create a new one. + +### Installing the Arduino Alexa Skill + +Let's go through the steps necessary to install the Arduino Alexa Skill. + +![Installing the Alexa Skill.](assets/alexa_phone_1.png) + +1. Once in the Amazon Alexa app, begin by tapping on "Devices". +2. Tap on the "Enable Smart home skills" button. +3. We will now see a list of featured ones, where we need to search for the right skill. +4. If we search for "Arduino" we will see a skill that has that exact name. + +![Installing the Alexa skill part 2.](assets/alexa_phone_2.png) + +5. Once we have selected it, we'll need to enable it. +6. We now need to sync it with our Arduino Cloud, by logging into it. +7. Our Alexa and Arduino Cloud is now synced! +8. We can now start discovering our devices! + +![Looking for devices.](assets/alexa_phone_3.png) + +### Amazon Alexa Devices Setup + +After waiting a little bit, we should see a new screen appear, where it says **"1 light found and connected"**. + +Click **"Set Up Device"**. If you like you can also add it to a group (this way you can control and organize your devices more easily), otherwise skip this part. + +![Light found and connected.](assets/alexa-mkr-rgb-shield-img-06.png) + +Congratulations! You should now be able to control the lights through your Alexa app. + +## Controlling the Lights + +To control the lights on our setup, we will need to head over to the **"Devices"** tab in the Alexa app. Once in the Devices tab, click on the **"Lights"** button. We will now see the available lights. If you have other lights already connected, they will appear here as well. In our case, we only have one, which is `LoungeArea`, which is the same name as the variable we created earlier in the Arduino Cloud. If we click on `LoungeArea` we will access the color / brightness control. + +![Controlling the lights through the Alexa app.](assets/alexa-mkr-rgb-shield-img-07.png) + +Any changes of color / brightness you make will be sent to our MKR WiFi 1010, which will change the pixels on the MKR RGB Shield accordingly. + + +### Troubleshooting + +One great way of knowing if data is coming through from the Alexa app is by checking the Serial Monitor. The sketch that we uploaded to the board includes a command that prints out the value of **r, g** and **b** whenever they receive new data. If the board is successfully connecting to the cloud, it is most likely a problem on setting up the Alexa device. + +## Over-the-Air (OTA) + +Did you know that the Arduino Cloud supports over the air uploads? When you've uploaded a sketch to your board once, it will become available for you to upload a new sketch to the board without connecting it to your computer! + +***Over the Air uploads require an Entry plan to the Arduino Cloud*** + +To use this feature, make sure the board has power. If your board is already connected to the Arduino Cloud, you will be able to upload to it over the air. Navigate to the Things sketch tab in the Arduino Cloud interface, and you should see it being discovered just as if it was connected via USB. diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-01.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-01.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-01.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-01.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-02.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-02.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-02.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-02.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-03.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-03.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-03.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-03.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-04.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-04.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-04.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-04.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-05.1.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-05.1.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-05.1.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-05.1.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-05.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-05.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-05.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-05.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-06.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-06.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-06.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-06.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-07.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-07.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-07.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-07.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-08.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-08.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa-mkr-rgb-shield-img-08.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa-mkr-rgb-shield-img-08.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_circuit_1.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa_circuit_1.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_circuit_1.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa_circuit_1.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_circuit_2.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa_circuit_2.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_circuit_2.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa_circuit_2.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_phone_1.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa_phone_1.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_phone_1.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa_phone_1.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_phone_2.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa_phone_2.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_phone_2.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa_phone_2.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_phone_3.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa_phone_3.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_phone_3.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa_phone_3.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_phone_4.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa_phone_4.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_phone_4.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa_phone_4.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_phone_5.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa_phone_5.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_phone_5.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa_phone_5.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_variables.png b/content/arduino-cloud/01.guides/08.alexa/assets/alexa_variables.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/alexa_variables.png rename to content/arduino-cloud/01.guides/08.alexa/assets/alexa_variables.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/associate_device.png b/content/arduino-cloud/01.guides/08.alexa/assets/associate_device.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/associate_device.png rename to content/arduino-cloud/01.guides/08.alexa/assets/associate_device.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/dashboard_edit_blank.png b/content/arduino-cloud/01.guides/08.alexa/assets/dashboard_edit_blank.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/dashboard_edit_blank.png rename to content/arduino-cloud/01.guides/08.alexa/assets/dashboard_edit_blank.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/device_overview.png b/content/arduino-cloud/01.guides/08.alexa/assets/device_overview.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/device_overview.png rename to content/arduino-cloud/01.guides/08.alexa/assets/device_overview.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/device_setup_1.png b/content/arduino-cloud/01.guides/08.alexa/assets/device_setup_1.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/device_setup_1.png rename to content/arduino-cloud/01.guides/08.alexa/assets/device_setup_1.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/device_setup_2.png b/content/arduino-cloud/01.guides/08.alexa/assets/device_setup_2.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/device_setup_2.png rename to content/arduino-cloud/01.guides/08.alexa/assets/device_setup_2.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/device_setup_3.png b/content/arduino-cloud/01.guides/08.alexa/assets/device_setup_3.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/device_setup_3.png rename to content/arduino-cloud/01.guides/08.alexa/assets/device_setup_3.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/device_setup_4.png b/content/arduino-cloud/01.guides/08.alexa/assets/device_setup_4.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/device_setup_4.png rename to content/arduino-cloud/01.guides/08.alexa/assets/device_setup_4.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/new_dashboard.png b/content/arduino-cloud/01.guides/08.alexa/assets/new_dashboard.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/new_dashboard.png rename to content/arduino-cloud/01.guides/08.alexa/assets/new_dashboard.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/new_device.png b/content/arduino-cloud/01.guides/08.alexa/assets/new_device.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/new_device.png rename to content/arduino-cloud/01.guides/08.alexa/assets/new_device.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/new_thing.png b/content/arduino-cloud/01.guides/08.alexa/assets/new_thing.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/new_thing.png rename to content/arduino-cloud/01.guides/08.alexa/assets/new_thing.png diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/thing_overview.png b/content/arduino-cloud/01.guides/08.alexa/assets/thing_overview.png similarity index 100% rename from content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/assets/thing_overview.png rename to content/arduino-cloud/01.guides/08.alexa/assets/thing_overview.png diff --git a/content/arduino-cloud/01.guides/guides.md b/content/arduino-cloud/01.guides/guides.md new file mode 100644 index 0000000000..9d18d4d56c --- /dev/null +++ b/content/arduino-cloud/01.guides/guides.md @@ -0,0 +1,3 @@ +--- +title: Guides +--- \ No newline at end of file diff --git a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-02.png b/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-02.png deleted file mode 100644 index 83f4dd6d20..0000000000 Binary files a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-02.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-04.png b/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-04.png deleted file mode 100644 index 463db9e763..0000000000 Binary files a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-04.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-05.png b/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-05.png deleted file mode 100644 index 552af8779b..0000000000 Binary files a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-05.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-06.png b/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-06.png deleted file mode 100644 index fb7828a2ea..0000000000 Binary files a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-06.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-timezone.png b/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-timezone.png deleted file mode 100644 index f3b954f713..0000000000 Binary files a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-timezone.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-02-1.png b/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-02-1.png deleted file mode 100644 index 78853aa80a..0000000000 Binary files a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-02-1.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-02.png b/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-02.png deleted file mode 100644 index 59b85ae9f6..0000000000 Binary files a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-02.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-03.png b/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-03.png deleted file mode 100644 index c3d2574a9f..0000000000 Binary files a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-03.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-04.png b/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-04.png deleted file mode 100644 index 04577b94b0..0000000000 Binary files a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-04.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-05.png b/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-05.png deleted file mode 100644 index a016571ab8..0000000000 Binary files a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-05.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-06.png b/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-06.png deleted file mode 100644 index d0858562fa..0000000000 Binary files a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-06.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-07.png b/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-07.png deleted file mode 100644 index cbec42be84..0000000000 Binary files a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-07.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-08.png b/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-08.png deleted file mode 100644 index d72bb22b3a..0000000000 Binary files a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-08.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/04.ota-getting-started/assets/OtA_board_selection.png b/content/arduino-cloud/02.features/04.ota-getting-started/assets/OtA_board_selection.png deleted file mode 100644 index 309d08f0fd..0000000000 Binary files a/content/arduino-cloud/02.features/04.ota-getting-started/assets/OtA_board_selection.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/04.ota-getting-started/assets/adding_variable.png b/content/arduino-cloud/02.features/04.ota-getting-started/assets/adding_variable.png deleted file mode 100644 index 863a7a0a60..0000000000 Binary files a/content/arduino-cloud/02.features/04.ota-getting-started/assets/adding_variable.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/04.ota-getting-started/assets/dashboard_widget.png b/content/arduino-cloud/02.features/04.ota-getting-started/assets/dashboard_widget.png deleted file mode 100644 index c3174f8ec8..0000000000 Binary files a/content/arduino-cloud/02.features/04.ota-getting-started/assets/dashboard_widget.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/04.ota-getting-started/assets/device_OtA.png b/content/arduino-cloud/02.features/04.ota-getting-started/assets/device_OtA.png deleted file mode 100644 index 3db84ef2b5..0000000000 Binary files a/content/arduino-cloud/02.features/04.ota-getting-started/assets/device_OtA.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/04.ota-getting-started/assets/final_dshboard.png b/content/arduino-cloud/02.features/04.ota-getting-started/assets/final_dshboard.png deleted file mode 100644 index 1f4c001ce9..0000000000 Binary files a/content/arduino-cloud/02.features/04.ota-getting-started/assets/final_dshboard.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/04.ota-getting-started/assets/iot_cloud_grid.png b/content/arduino-cloud/02.features/04.ota-getting-started/assets/iot_cloud_grid.png deleted file mode 100644 index f87735b7ec..0000000000 Binary files a/content/arduino-cloud/02.features/04.ota-getting-started/assets/iot_cloud_grid.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/04.ota-getting-started/assets/select_device.png b/content/arduino-cloud/02.features/04.ota-getting-started/assets/select_device.png deleted file mode 100644 index f7b796cb61..0000000000 Binary files a/content/arduino-cloud/02.features/04.ota-getting-started/assets/select_device.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img01.png b/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img01.png deleted file mode 100644 index 7c502ffaee..0000000000 Binary files a/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img01.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img02.png b/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img02.png deleted file mode 100644 index d3eccfe971..0000000000 Binary files a/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img02.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img03.png b/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img03.png deleted file mode 100644 index a079d1fc4c..0000000000 Binary files a/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img03.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img04.png b/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img04.png deleted file mode 100644 index 283b884d1d..0000000000 Binary files a/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img04.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img05.png b/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img05.png deleted file mode 100644 index 652d457456..0000000000 Binary files a/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img05.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img06.png b/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img06.png deleted file mode 100644 index 209ba98d26..0000000000 Binary files a/content/arduino-cloud/02.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img06.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-00.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-00.png deleted file mode 100644 index 59b85ae9f6..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-00.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-01.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-01.png deleted file mode 100644 index 1820106775..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-01.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-02.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-02.png deleted file mode 100644 index 5503a692b0..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-02.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-03.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-03.png deleted file mode 100644 index ec705adcf3..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-03.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-04.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-04.png deleted file mode 100644 index bbb8d5a892..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-04.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-05.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-05.png deleted file mode 100644 index e62542910b..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-05.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-06.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-06.png deleted file mode 100644 index a21156d028..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-06.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-07.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-07.png deleted file mode 100644 index 7e9fa6c8db..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-07.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-08.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-08.png deleted file mode 100644 index b4467a69b4..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-08.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-09.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-09.png deleted file mode 100644 index 605a81b822..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-09.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-10.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-10.png deleted file mode 100644 index 74ab10faee..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-10.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-11.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-11.png deleted file mode 100644 index 5b25e807e8..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-11.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-12.png b/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-12.png deleted file mode 100644 index 39b8464bb9..0000000000 Binary files a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-12.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/08.iot-cloud-historical-data/assets/cloud-historical-data-confirmation.png b/content/arduino-cloud/02.features/08.iot-cloud-historical-data/assets/cloud-historical-data-confirmation.png deleted file mode 100644 index 6a17f1b09f..0000000000 Binary files a/content/arduino-cloud/02.features/08.iot-cloud-historical-data/assets/cloud-historical-data-confirmation.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/08.iot-cloud-historical-data/assets/cloud-historical-data-dashboard.png b/content/arduino-cloud/02.features/08.iot-cloud-historical-data/assets/cloud-historical-data-dashboard.png deleted file mode 100644 index 560cbfbb26..0000000000 Binary files a/content/arduino-cloud/02.features/08.iot-cloud-historical-data/assets/cloud-historical-data-dashboard.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/08.iot-cloud-historical-data/assets/cloud-historical-data-selecting-variable.png b/content/arduino-cloud/02.features/08.iot-cloud-historical-data/assets/cloud-historical-data-selecting-variable.png deleted file mode 100644 index 09ad9944ab..0000000000 Binary files a/content/arduino-cloud/02.features/08.iot-cloud-historical-data/assets/cloud-historical-data-selecting-variable.png and /dev/null differ diff --git a/content/arduino-cloud/02.features/08.iot-cloud-historical-data/assets/cloud-historical-data.png b/content/arduino-cloud/02.features/08.iot-cloud-historical-data/assets/cloud-historical-data.png deleted file mode 100644 index 52a4d68602..0000000000 Binary files a/content/arduino-cloud/02.features/08.iot-cloud-historical-data/assets/cloud-historical-data.png and /dev/null differ diff --git a/content/arduino-cloud/02.hardware/01.devices/assets/device-key.png b/content/arduino-cloud/02.hardware/01.devices/assets/device-key.png new file mode 100644 index 0000000000..1ef74de73f Binary files /dev/null and b/content/arduino-cloud/02.hardware/01.devices/assets/device-key.png differ diff --git a/content/arduino-cloud/02.hardware/01.devices/assets/device-type.png b/content/arduino-cloud/02.hardware/01.devices/assets/device-type.png new file mode 100644 index 0000000000..7e0793d2db Binary files /dev/null and b/content/arduino-cloud/02.hardware/01.devices/assets/device-type.png differ diff --git a/content/arduino-cloud/02.hardware/01.devices/devices.md b/content/arduino-cloud/02.hardware/01.devices/devices.md new file mode 100644 index 0000000000..205f2b462c --- /dev/null +++ b/content/arduino-cloud/02.hardware/01.devices/devices.md @@ -0,0 +1,104 @@ +--- +title: Device Types +description: Learn about devices in the Arduino Cloud and how to configure them. +tags: [Arduino Cloud, Devices] +author: Karl Söderby +--- + +The Arduino Cloud supports a range of official and third-party boards which are handled in the **"Devices"** tab. Devices are considered the "virtual twin" of your physical boards. + +Currently, the following device types are supported: +- Wi-Fi® with encryption through on-board crypto chip +- Wi-Fi® through ESP32 with user credentials +- LoRaWAN® +- Ethernet +- Cellular (GSM / NB-IoT) +- Manual (Python, MicroPython, JavaScript) + +## Configure a Device + +Configuring a device in the Arduino Cloud is done through an installation wizard. There are three main options available: +- Wi-Fi® board with crypto chip (automatic configuration of API key) +- ESP32/ESP8266 (manual configuration of API key) +- Python, MicroPython, JavaScript (manual configuration of API key) + +These options are visible when you create a new device: + +![Device options.](assets/device-type.png) + +Depending on what type of device you choose, the installation wizard will differ, as different connection methods to the Arduino Cloud are used. + +## Type of Devices + +### Official Wi-Fi® Boards + +Wi-Fi® devices connect to the Arduino Cloud via a local network and are suitable for short-range connectivity projects. + +Most Wi-Fi® supported Arduino boards have a crypto chip that enables secure communication. This chip is configured during setup and enables secure communication for the board without having to enter any API keys in the code. + +Wi-Fi devices require you to enter valid credentials for the Wi-Fi network you attempt to connect to. This is done in the Thing configuration. + +***Read more and see the list of all compatible Wi-Fi® boards in the [Arduino Cloud Wi-Fi documentation](/arduino-cloud/hardware/wifi).*** + +### Official LoRaWAN® Boards + +LoRaWAN® boards also have a crypto chip on board but connect to the Arduino Cloud through nearby LoRaWAN® gateways. LoRaWAN® devices are designed to use minimal power and transmit over longer ranges, hence the name: +- **LoRa®** - long-range technology used for transmission of data using minimal amounts of power for long distances. +- **LoRaWAN®** - a network of gateways connected to the Internet that can receive and send data to LoRa® devices. + +***Read more and see the list of all compatible LoRa® boards in the [Arduino Cloud LoRaWAN® documentation](/arduino-cloud/hardware/lora).*** + +### ESP32 / ESP8266 (Wi-Fi®) + +ESP32/ESP8266 based boards typically don't have an onboard crypto chip. Instead when configuring a device, a **[secret key](#secret-key--device-id)** is generated, that can together with the **device ID** be used to securely connect to the Arduino Cloud. + +There are currently two official ESP32 based Arduino boards: +- [Arduino UNO R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi) +- [Arduino Nano ESP32](https://store.arduino.cc/products/nano-esp32) + +You can also configure a wide range of third-party ESP32/ESP8266 boards. + +***Read more and see the list of all compatible ESP32/ESP8266 boards in the [Arduino Cloud ESP32/ESP8266 documentation](/arduino-cloud/hardware/wifi#configure-esp-boards).*** + +### Manual Devices + +Manual devices are designed for interfacing with JavaScript, Python & MicroPython, and can for example run on a Raspberry Pi, but also on any. Creating a manual device generates a **[secret key](#secret-key--device-id)** that can together with the **device ID** be used to securely connect to the Arduino Cloud. + +***Note that manual devices do not have a sketch associated.*** + +Check the guides below to get started with each of the programming languages: + +- [Connect to Arduino Cloud (JavaScript)](/arduino-cloud/guides/javascript) +- [Connect to Arduino Cloud (Python)](/arduino-cloud/guides/python) +- [Connect to Arduino Cloud (MicroPython)](/arduino-cloud/guides/micropython) + +## Secret Key & Device ID + +When configuring ESP32/ESP8266 and Manual Devices, you generate a **Device ID** and a **Secret Key**. This is the final step of the configuration of your device. + +![Your Device ID / Secret Key.](assets/device-key.png) + +Make sure to download or store this information somewhere, as you cannot retrieve the Secret Key after this step. + +***If you lose your Secret Key or forget to download and store your information you will need to remove and set up the device again.*** + +## Device Information + +A device's information can be accessed directly in the Arduino Cloud under **"Devices"**. Depending on the type, the information will differ. + +- **ID** - your device's ID, mainly needed for manual device connection. +- **Type** - name / type of board, e.g. MKR WiFi 1010. +- **Connection Type** - e.g. Wi-Fi®, LoRaWAN®. +- **FQBN** - fully qualified board name, used for compilation for a specific board, e.g. `arduino:samd:mkrwifi1010`. +- **Serial Number** - when configuring an official board, the serial number will be registered. +- **Connectivity Module Firmware** - for Wi-Fi® boards only, the current firmware on the board's radio module. +- **Thing** - Thing associated with a device. +- **Status** - status of the device, online/offline. +- **Last Activity** - timestamp of the last synchronization. +- **Added** - timestamp of date device was added to the Arduino Cloud. + +## Connection Handler + +All hardware devices connecting to the Arduino Cloud use the following libraries: +- [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud) - main library for Arduino Cloud, including methods for sending and receiving data, handling callbacks etc. Either via TCP/IP or LPWAN. +- [Arduino_ConnectionHandler](https://github.com/arduino-libraries/Arduino_ConnectionHandler) - library for handling connection methods to the Arduino Cloud (Wi-Fi®, LoRaWAN®, Ethernet, NB-IoT, GSM). diff --git a/content/arduino-cloud/02.hardware/02.wifi/assets/device-key.png b/content/arduino-cloud/02.hardware/02.wifi/assets/device-key.png new file mode 100644 index 0000000000..b5cc86503b Binary files /dev/null and b/content/arduino-cloud/02.hardware/02.wifi/assets/device-key.png differ diff --git a/content/arduino-cloud/02.hardware/02.wifi/assets/device-type.png b/content/arduino-cloud/02.hardware/02.wifi/assets/device-type.png new file mode 100644 index 0000000000..7e0793d2db Binary files /dev/null and b/content/arduino-cloud/02.hardware/02.wifi/assets/device-type.png differ diff --git a/content/arduino-cloud/02.hardware/02.wifi/assets/esp32-supported-boards.png b/content/arduino-cloud/02.hardware/02.wifi/assets/esp32-supported-boards.png new file mode 100644 index 0000000000..29dc2e9778 Binary files /dev/null and b/content/arduino-cloud/02.hardware/02.wifi/assets/esp32-supported-boards.png differ diff --git a/content/arduino-cloud/02.hardware/02.wifi/assets/esp32.png b/content/arduino-cloud/02.hardware/02.wifi/assets/esp32.png new file mode 100644 index 0000000000..56bb3a2f2e Binary files /dev/null and b/content/arduino-cloud/02.hardware/02.wifi/assets/esp32.png differ diff --git a/content/arduino-cloud/02.hardware/02.wifi/assets/wifi.png b/content/arduino-cloud/02.hardware/02.wifi/assets/wifi.png new file mode 100644 index 0000000000..7546b31688 Binary files /dev/null and b/content/arduino-cloud/02.hardware/02.wifi/assets/wifi.png differ diff --git a/content/arduino-cloud/02.hardware/02.wifi/wifi.md b/content/arduino-cloud/02.hardware/02.wifi/wifi.md new file mode 100644 index 0000000000..2af33e9d45 --- /dev/null +++ b/content/arduino-cloud/02.hardware/02.wifi/wifi.md @@ -0,0 +1,106 @@ +--- +title: Wi-Fi® / ESP32 +description: Setup and configure Wi-Fi® devices in the Arduino Cloud. +tags: [Arduino Cloud, Wi-Fi, ESP32] +author: Karl Söderby +--- + +A number of official Arduino boards support a connection to the Arduino Cloud via Wi-Fi®. Some boards also have an onboard crypto chip that stores the credentials automatically when configuring the device. + +There are currently two ways of configuring a Wi-Fi® board: +- By configuring an onboard crypto chip (available for a number of official Arduino boards only). +- Through a Secret Key / API key (ESP32/ESP8266 based boards\*). + +***\*Note that the [UNO R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi) and [Nano ESP32](https://store.arduino.cc/products/nano-esp32) boards use this method.*** + +## Supported Boards + +Connection via Wi-Fi® is an easy alternative, and your credentials can safely be entered during the configuration of a project. This type of connection is most suitable for low-range projects, where you connect your board to the cloud via your home/work/school network router. + +## Configure Wi-Fi® Boards + +### List of Wi-Fi® Boards + +The following boards connect to the Arduino Cloud via Wi-Fi®, using the onboard encryption: + +- [MKR WiFi 1010](https://store.arduino.cc/arduino-mkr-wifi-1010) +- [Nano RP2040 Connect](https://store.arduino.cc/nano-rp2040-connect) +- [Nano 33 IoT](https://store.arduino.cc/arduino-nano-33-iot) +- [GIGA R1 WiFi](https://store.arduino.cc/products/giga-r1-wifi) +- [Portenta H7](https://store.arduino.cc/portenta-h7) +- [Portenta H7 Lite Connected](https://store.arduino.cc/products/portenta-h7-lite-connected) +- [Portenta Machine Control](https://store.arduino.cc/products/arduino-portenta-machine-control) +- [Nicla Vision](https://store.arduino.cc/products/nicla-vision) +- [Opta](https://store.arduino.cc/products/opta-wifi) + +### Setup a Wi-Fi® Board + +To configure a Wi-Fi® board in the Arduino Cloud, follow the steps below: + +**1.** Connect your board to your computer. + +**2.** Go to [Arduino Cloud](https://app.arduino.cc), and navigate to the **"Devices"** section. Click on the **"Add Device"** button and then select the **"Arduino Board"**. After a while, your board will be visible, and you can click on the **"Configure"** button. + +![Board show up.](assets/wifi.png) + +**3.** Allow some time for the configuration, as a sketch is being uploaded to your board and your crypto chip is configured. + +Once done, your board is configured and ready to be used in the Arduino Cloud. + +After setting up a device, you can check out the official [Getting Started (Arduino / C++)](/arduino-cloud/guides/arduino-c) guide. This will guide you to successfully send data between your board and Arduino Cloud. + +## Configure ESP Boards + +ESP32 / ESP8266 based boards connect to the Arduino Cloud via a **secret key**, generated during device configuration. + +There is a large number of ESP32/ESP8266 supported boards, which you select from a drop-down menu. + +![Range of ESP32 boards.](assets/esp32-supported-boards.png) + +***If you don't find your board in the list, just select the ESP32 model (e.g. `ESP32S3 Dev Module`).*** + +The following official boards have an ESP32 as main/co-processor and connect using a secret key as well. + +- [UNO R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi) +- [Nano ESP32](https://store.arduino.cc/products/nano-esp32) + +### Setup ESP32/ESP8266 Boards + +To configure an ESP32 board in the Arduino Cloud, follow the steps below: + +**1.** Connect your board to your computer. + +**2.** Go to [Arduino Cloud](https://app.arduino.cc), and navigate to the **"Devices"** section. Click on the **"Add Device"** button and then select the **"Third Party Board"**. + +![Select "Third Party Device"](assets/esp32.png) + +**3.** Select your board type, and give your board a name. When finished, you will generate a **secret key** and **device ID**. You can download or manually store your credentials somewhere, but the secret key can **not be retrieved** after you close the window. + +***If you lose your Secret Key or forget to download and store your information you will need to remove and set up the device again.*** + +![Secret / Device Key.](assets/device-key.png) + +Your ESP32/ESP8266 board is now configured and ready to be used in the Arduino Cloud. + +After setting up a device, you can check out the official [Getting Started (Arduino / C++)](/arduino-cloud/guides/arduino-c) guide. This will guide you to successfully send data between your board and Arduino Cloud. + +### Verified ESP32 Boards Supporting OTA + +Over-the-air (OTA) allows you to remotely upload sketches to your board without a physical connection over USB. + +The following ESP32 boards have been tested and verified to support OTA: + +- ESP32-S2-DevKitC +- NODEMCU-32-S2 +- WEMOS LOLIN D32 +- ESP32-S3-DevKitC +- WEMOS LOLIN D32 +- ESP32-CAM +- NodeMCU-32S +- Freenove ESP32 WROVER +- ESP32-DevKitC32E +- DOIT ESP32 DevKit v1 + +## Supported Frequencies + +All official Arduino boards currently only support the 2.4GHz frequency band for transmitting data. \ No newline at end of file diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-gateway-img-01.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-gateway-img-01.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-gateway-img-01.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-gateway-img-01.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-gateway-img-02.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-gateway-img-02.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-gateway-img-02.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-gateway-img-02.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-01.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-01.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-01.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-01.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-02.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-02.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-02.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-02.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-03.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-03.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-03.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-03.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-04.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-04.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-04.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-04.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-05.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-05.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-05.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-05.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-06.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-06.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-06.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-06.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-07.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-07.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-07.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-07.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-08.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-08.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-08.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-08.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-09.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-09.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-09.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-09.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-10.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-10.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-10.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-10.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-11.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-11.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-11.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-11.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-12.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-12.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-12.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-12.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-13.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-13.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-13.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-13.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-14.5.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-14.5.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-14.5.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-14.5.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-14.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-14.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-14.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-14.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-15.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-15.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-15.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-15.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-16.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-16.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-16.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-16.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-17.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-17.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-17.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-17.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-18.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-18.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-18.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-18.png diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-19.png b/content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-19.png similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/assets/cloud-lora-img-19.png rename to content/arduino-cloud/02.hardware/03.lora/assets/cloud-lora-img-19.png diff --git a/content/arduino-cloud/02.hardware/03.lora/assets/lora.png b/content/arduino-cloud/02.hardware/03.lora/assets/lora.png new file mode 100644 index 0000000000..b0982dd804 Binary files /dev/null and b/content/arduino-cloud/02.hardware/03.lora/assets/lora.png differ diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/hero-banner.svg b/content/arduino-cloud/02.hardware/03.lora/hero-banner.svg similarity index 100% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/hero-banner.svg rename to content/arduino-cloud/02.hardware/03.lora/hero-banner.svg diff --git a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/cloud-lora-getting-started_.md b/content/arduino-cloud/02.hardware/03.lora/lora.md similarity index 66% rename from content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/cloud-lora-getting-started_.md rename to content/arduino-cloud/02.hardware/03.lora/lora.md index cc668a41a5..f67b74668f 100644 --- a/content/arduino-cloud/01.getting-started/04.cloud-lora-getting-started/cloud-lora-getting-started_.md +++ b/content/arduino-cloud/02.hardware/03.lora/lora.md @@ -1,90 +1,82 @@ --- -title: 'Configuring LoRaWAN® devices in the Arduino Cloud' -compatible-products: - - mkr-wan-1300 - - mkr-wan-1310 -difficulty: intermediate +title: 'LoRaWAN®' description: 'Connect your LoRaWAN® devices to the Arduino Cloud platform via The Things Network.' tags: - LoRa® - LoRaWAN® - 'The Things Industries' - - 'IoT Cloud' + - 'Arduino Cloud' author: 'Karl Söderby' hero_position: 2 ---- - - -![Arduino Cloud and The Things Network.](assets/cloud-lora-img-01.png ) - -## Introduction - +hardware: + - hardware/01.mkr/01.boards/mkr-wan-1300 + - hardware/01.mkr/01.boards/mkr-wan-1310 +--- + +Some Arduino boards support a connections to the Arduino Cloud via LoRaWAN® ([The Things Stack](https://www.thethingsindustries.com/stack/)). + +In this document you will find: + +- List of supported devices. +- Configure a LoRaWAN® device in the Arduino Cloud. +- Register an account on The Things Console. +- Create a simple testing program for the end device. +- View data from the device in the Arduino Cloud. +- Send data to the device from the Arduino Cloud. + +## Supported Boards + +The following boards connect to the Arduino Cloud via [The Things Stack](https://www.thethingsindustries.com/stack/), a LoRaWAN® Network Server connected to thousands of public LoRa® gateways. + +- [MKR WAN 1300](https://store.arduino.cc/arduino-mkr-wan-1300-lora-connectivity-1414) +- [MKR WAN 1310](https://store.arduino.cc/mkr-wan-1310) + +## The Things Stack -If you are interested in building cheap, long range & low power devices, you will be excited to hear that Arduino Cloud is interfaced with [The Things Stack](https://www.thethingsindustries.com/stack/ ) network (TTS). When configuring a LoRaWAN® device (MKR WAN 1300/1310), you will also automatically register your device on the The Things Stack platform. +If you are interested in building cheap, long-range & low-power devices, you will be excited to hear that Arduino Cloud is interfaced with [The Things Stack](https://www.thethingsindustries.com/stack/ ) network (TTS). When configuring a LoRaWAN® device (MKR WAN 1300/1310), you will also automatically register your device on the "The Things Stack" platform. -So, what does that mean for you? It means that you can connect to any of the **22000+ public gateways** that make up that network. With coverage in most parts of the world, LoRa® technology has become increasingly more popular, as it continues to chirp payloads using the license-free frequency bands! Your end-devices (such as the MKR WAN 1310), can be setup in remote locations (or cities, of course), where there's no Internet connection. These devices can then send data to nearby gateways connected to the TTS service, which in turn forwards the data to the Arduino Cloud. Data can also be sent the other way, from the Arduino Cloud to the end device via TTS. +So, what does that mean for you? It means that you can connect to any of the **22 000+ public gateways** making up the network. With coverage in most parts of the world, LoRa® technology has become increasingly more popular, as it continues to chirp payloads using the license-free frequency bands! Your end devices (such as the MKR WAN 1310), can be set up in remote locations (or cities, of course), where there's no internet connection. These devices can then send data to nearby gateways connected to the TTS service, which in turn forwards the data to the Arduino Cloud. Data can also be sent the other way, from the Arduino Cloud to the end device via TTS. -In this tutorial we will walk you through the steps needed to successfully provision devices that use the Arduino Cloud & The Things Network, from unboxing your device until viewing data on a dashboard! +In this tutorial, we will walk you through the steps needed to successfully provision devices that use the Arduino Cloud & The Things Network, from unboxing your device to viewing data on a dashboard! -***Please note that when working with LoRaWAN® devices, data rates are very limited. Messages sent from devices should be limited to once every several minutes. Methods for implementing this are described further down in this article. To read more about limitations using the LoRaWAN® network, please visit [The Things Network Limitations article](https://www.thethingsnetwork.org/docs/lorawan/limitations/ ).*** +***Please note that when working with LoRaWAN® devices, data rates are very limited. Messages sent from devices should be limited to once every several minutes. Methods for implementing this are described further down in this article. To read more about limitations when using the LoRaWAN® network, please visit [The Things Network Limitations article](https://www.thethingsnetwork.org/docs/lorawan/limitations/ ).*** ### Terminology Run-Trough - - -- **LoRa®** - short for **Lo**ng **Ra**nge, and is a modulation technique used to send and receive data over low-power, wide-area networks (LPWAN). + +- **LoRa®** - short for **Lo**ng **Ra**nge, is a modulation technique used to send and receive data over low-power, wide-area networks (LPWAN). - **LoRaWAN®** - can be defined as the networking protocol. The architecture of the network consists of different gateways that relay messages from low-power devices over long ranges, to central network servers. -- **MKR WAN 1300/1310** - development boards that has a LoRa® module capable of sending and receiving packets of data. +- **LoRa® gateway** - a network router able to send and receive LoRa RF packets and forward them on the internet. +- **MKR WAN 1300/1310** - development boards that have a LoRa® module capable of sending and receiving packets of data. - **End device/node** - end device/node is a term used for deployed devices such as the MKR WAN 1310, that for example are reading and processing sensor data. -- **The Things Network (TTN)** - a not for profit association, making available the TTS Community Edition as a public LoRaWAN® network service for free. +- **The Things Network (TTN)** - a nonprofit association, making the TTS Community Edition available as a public LoRaWAN® network service for free. - **The Things Stack Network (TTS)** - a cloud platform used by TTN and TTI for their LoRaWAN® connectivity networks. - **The Things Industries (TTI)** - a company that runs and manages The Things Network and offers private LoRaWAN network and support for enterprise customers. - **The Things Stack console (TTC)** - a service that allows you to register devices and handle incoming or outgoing data. - **Device EUI** - a code to identify your device. - **App EUI** - a code to identify your application. - **App KEY** - a key used for encryption and decryption of a payload. -- **LoRa® gateway** - a network router able to send and receive LoRa RF packets and forward them on Internet. -- **Frequency Band (e.g. 868 MHz, 915 MHz)** - LoRa oxperates only on specific, license-free frequencies which differs from region to region. For example, the band used in Europe is 868 MHz, while North America uses the 915 MHz band. - +- **Frequency Band (e.g. 868 MHz, 915 MHz)** - LoRa only operates on specific, license-free frequencies which differ from region to region. For example, the band used in Europe is 868 MHz, while North America uses the 915 MHz band. + ### Related Resources - If you want to learn more about Arduino and LoRa®, you can check out the resources below: -- [MKR WAN 1300 documentation page.](../../../../hardware/mkr-wan-1300 ) -- [MKR WAN 1310 documentation page](../../../../hardware/mkr-wan-1310 ) -- [LPWAN (Low-Power Wide-Area Networks) 101](../../../../learn/communication/low-power-wide-area-networks-101 ) - -## Goals - - -The goals of this project are: -- Configure a LoRaWAN® device in the Arduino Cloud. -- Register an account on The Things Console. -- Create a simple testing program for the end device. -- View data from the device in the Arduino Cloud. -- Send data to the device from the Arduino Cloud. - - -## Hardware & Software needed - - -- [Arduino IoT Cloud](https://create.arduino.cc/iot/ ) -- [Arduino MKR WAN 1300](https://store.arduino.cc/mkr-wan-1300 ) or [Arduino MKR WAN 1310](https://store.arduino.cc/mkr-wan-1310 ) -- [Antenna](https://store.arduino.cc/antenna ) +- [MKR WAN 1300 documentation page.](/hardware/mkr-wan-1300) +- [MKR WAN 1310 documentation page](/hardware/mkr-wan-1310) +- [LPWAN (Low-Power Wide-Area Networks) 101](/learn/communication/low-power-wide-area-networks-101) ## Circuit - Follow the wiring diagram below to connect the antenna to the MKR WAN 1300/1310 board. ![Connect the antenna to the MKR WAN 1300/1310 board.](assets/cloud-lora-img-02.png ) -## Step 1: Configuring Your Device - +## Cloud Setup + +### Configuring Device - -**1.** Navigate to the [Arduino Cloud IoT platform](https://create.arduino.cc/iot/things ). +**1.** Navigate to the [Arduino Cloud IoT platform](https://app.arduino.cc). **2.** Sign in or follow the registration process. @@ -131,14 +123,14 @@ Some things to try: - Re-install the Create Agent. -## Step 2: Registering The Things Stack Network Account +## The Things Stack Network In this step, we will complete the registration so we can access the **The Things Console (TTC)**. Here we can see the status of our device, if any data is coming in or out and much more. ***Note that you will not need to make any changes in The Things Console, but access is useful to check if your board sends and receives data correctly. All information (DevEUI, AppEUI & AppKey) is available through the Arduino Cloud as well. Your TTC app will automatically be created, and the integration to the Arduino Cloud done automatically.*** -**1.** After your device was successfully configured, an **email was sent to your account's email address**, and an account was automatically created on **The Things Stack Network**. The email sent out includes a link to **creating a password** for that account, which you will need to follow to complete the registration. +**1.** After your device is successfully configured, an **email is sent to your account's email address**, and an account is automatically created on **The Things Stack Network**. The email includes a link to **creating a password** for that account, which you will need to follow to complete the registration. ![Email from TTC.](assets/cloud-lora-img-08.png ) @@ -168,7 +160,7 @@ In this step, we will complete the registration so we can access the **The Thing ![Click on the app.](assets/cloud-lora-img-14.png ) -**8.** You are now in the application overview. Here you will find a lot of useful information, such as **DevEUI, AppEUI & AppKey**, and see the live data that is sent to and from your device. You do not need to make any changes here, instead it acts as a great troubleshooting tool to check if your device is working. +**8.** You are now in the application overview. Here you will find a lot of useful information, such as **DevEUI, AppEUI & AppKey**, and see the live data that is sent to and from your device. You do not need to make any changes here, but it acts as a great troubleshooting tool to check if your device is working. ### TTI Email Expiration @@ -177,12 +169,12 @@ After some time, the automatic email sent out by TTI will expire. If the link is ![Restart the activation.](assets/cloud-lora-img-14.5.png ) -## Step 3: Completing Arduino Cloud Setup +## Final Cloud Setup -In this step, we will complete the Arduino Cloud setup that we started earlier by configuring a device. We will create a simple **test variable**, that we will use to send data from the MKR WAN 1300/1310 device. This will just be a counter that updates **3 minutes**, to see if the data can be successfully sent from **end device** to the **Arduino Cloud** via the **The Things Network**. +In this step, we will complete the Arduino Cloud setup that we started earlier by configuring a device. We will create a simple **test variable**, that we will use to send data from the MKR WAN 1300/1310 device. This will just be a counter that updates **3 minutes**, to see if the data can be successfully sent from the **end device** to the **Arduino Cloud** via the **The Things Network**. -***At this point, we will need to make sure that we are in reach of a gateway registered to The Things Network. This might take a few attempts, depending on your device's success of transmitting to a nearby gateway. You can check the coverage of your area through either [TTN Map](https://www.thethingsnetwork.org/map ) or the [TTN Mapper](https://ttnmapper.org/ )*** +***At this point, we will need to make sure that we are within reach of a gateway registered to The Things Network. This might take a few attempts, depending on your device's success of transmitting to a nearby gateway. You can check the coverage of your area through either [TTN Map](https://www.thethingsnetwork.org/map ) or the [TTN Mapper](https://ttnmapper.org/ )*** **1.** After TTS registration is complete, head back to the Arduino Cloud, and to the Thing you created earlier. Here, we will need to click on the **"Add Variable"** button, following the image below: @@ -209,12 +201,12 @@ void setup() { // Defined in thingProperties.h initProperties(); - // Connect to Arduino IoT Cloud + // Connect to Arduino Cloud ArduinoCloud.begin(ArduinoIoTPreferredConnection, false); /* The following function allows you to obtain more information - related to the state of network and IoT Cloud connection and errors + related to the state of network and Arduino Cloud connection and errors the higher number the more granular information you’ll get. The default is 0 (only errors). Maximum is 4 @@ -242,15 +234,15 @@ This code will simply increase the `test` variable every 3 minutes, which will s ***Note that the 180000 milliseconds / 180 seconds interval should be in place to limit the amount of data being sent from the device to the Arduino Cloud. This can also be defined during the variable creation in the Thing interface to update only every 180 seconds.*** -**4.** Finally, we can upload the sketch to the board. After we have uploaded it, the board will start sending data via The Things Network, to the Arduino Cloud. We can check if we are receiving any data in the **Things overview**, under the **"Last Value / Last Update"** column. +**4.** Finally, we can upload the sketch to the board. After the upload, the board will start sending data via The Things Network, to the Arduino Cloud. We can check if we are receiving any data in the **Things overview**, under the **"Last Value / Last Update"** column. -![Data from the MKR WAN 1300/1310 device.](assets/cloud-lora-img-18.png ) +![Data from the MKR WAN 1300/1310 device.](assets/cloud-lora-img-18.png) -**5a.** After we have uploaded the sketch to the board, we can head over to the TTS console, then to **Applications > NameOfApp > End Devices**. Here we can see if data is received. Basically, if it is not receiving any data, it means that data is not correctly passing through the gateway and the Internet to TTS. +**5a.** After we have uploaded the sketch to the board, we can head over to the TTS console, then to **Applications > NameOfApp > End Devices**. Here we can see if data is received. Basically, if no data is received, it means that data is not correctly passing through the gateway and the Internet to TTS. -**5b.** If **successful**, in the **"live data"** section, the "first sign of life" should be a message that says **"Accept join-request"**. Then under "End Devices" there's a column named **Last Seen**, which should have a **blue circle** and how long since it was last seen, e.g. 5 minutes or 2 hours. +**5b.** If **successful**, in the **"live data"** section, the "first sign of life" should be a message that says **"Accept join-request"**. Then under "End Devices" there's a column named **Last Seen**, which should have a **blue circle** and show how long since it was last seen, e.g. 5 minutes or 2 hours. -**5c.** If **unsuccessful**, under "End Devices", you can see a **yellow circle** next to the text **"Unknown"**. This means your board has not been sending any data recently. +**5c.** If **unsuccessful**, under "End Devices", you can see a **yellow circle** next to the text **"Unknown"**. This means your board has not been sending any data recently. ![Successful/unsuccessful attempts.](assets/cloud-lora-img-19.png ) @@ -263,24 +255,23 @@ This code will simply increase the `test` variable every 3 minutes, which will s ## Arduino PRO Gateway -If you have an Arduino PRO Gateway, you will need to register it, using the [manager for Linux devices](https://create.arduino.cc/devices/ ). +If you have an Arduino PRO Gateway, you will need to register it, using the [manager for Linux devices](https://app.arduino.cc/devices). -You can visit the [Activate an Arduino Pro Gateway with IoT Cloud](https://support.arduino.cc/hc/en-us/articles/4407770369042-Activate-an-Arduino-Pro-Gateway-with-IoT-Cloud ) article for more details. +You can visit the [Activate an Arduino Pro Gateway with Arduino Cloud](https://support.arduino.cc/hc/en-us/articles/4407770369042-Activate-an-Arduino-Pro-Gateway-with-IoT-Cloud ) article for more details. ### Migrate Existing Gateway - - -If you had a gateway setup prior to the A2A to TTS migration, you will need to complete the following steps to use the Pro Gateway. + +If you have an existing gateway setup prior to the A2A to TTS migration, you will need to complete the following steps to use the Pro Gateway. To perform the Arduino Pro gateway migration: -**1.** The Gateway **needs** be turned on and connected to Internet. +**1.** The Gateway **needs** to be turned on and connected to the internet. -**2.** Backup any existing sketch or custom docker images of the Gateway. +**2.** Back up any existing sketch or custom docker images of the Gateway. -**3.** Delete the device using “Manager for Linux” page. It is very important that the Gateway is **turned on and connected to the Internet.** +**3.** Delete the device using the “Manager for Linux” page. It is very important that the Gateway is **turned on and connected to the Internet.** -![Click on the "Delete" button.](assets/cloud-lora-gateway-img-01.png ) +![Click on the "Delete" button.](assets/cloud-lora-gateway-img-01.png) **4.** Redo the provisioning procedure. @@ -298,15 +289,14 @@ To perform the Arduino Pro gateway migration: ![Deploy a new container.](assets/cloud-lora-gateway-img-02.png ) ### Provision New Gateway - - + To perform the Arduino Pro gateway provisioning: -**1.** Claim the GW in the “Manager For Linux” page +**1.** Claim the GW in the “Manager For Linux” page. -**2.** Stop the packet forwarder +**2.** Stop the packet forwarder. -**3.** Delete the existing packet forwarder in the “Container” page +**3.** Delete the existing packet forwarder in the “Container” page. **4.** Deploy the new packet forwarder using the following parameters: @@ -318,19 +308,11 @@ To perform the Arduino Pro gateway provisioning: ![Deploy a new container.](assets/cloud-lora-gateway-img-02.png ) ### Register a Gateway on TTS - - + As **Arduino Cloud IoT** is now interfacing with the **The Things Stack** network, you can set up your own gateway through their services (this can be done through the same console that is used to check device status). You can visit [The Things Industries](https://www.thethingsindustries.com/stack/ ) to see what commercial gateways are supported. -See below links for more resources on adding gateways to the Things Stack network. +See the link below for more resources on adding gateways to the Things Stack network. - [Adding Gateways | The Things Industries](https://www.thethingsindustries.com/docs/gateways/adding-gateways/ ) - [Recommended Gateways | YouTube](https://www.youtube.com/watch?v=h_6dIte_IxI&ab_channel=TheThingsNetwork ) - -## Conclusion - - -In this guide we have gone through the steps necessary to connect a MKR WAN 1300/1310 board to the **Arduino Cloud** via **The Things Network**. We have briefly gone through **the console of The Things Stack**, the backend portal that provides information on the status of our devices. - -The integration between the two services is a great milestone for makers or professionals working with LoRaWAN® devices and IoT development. As the Arduino Cloud and The Things Console handle the backend applications, you can focus on creating great projects with minimal effort. You can also monitor and control them through dashboards in the Arduino Cloud. \ No newline at end of file diff --git a/content/arduino-cloud/02.hardware/04.ethernet/assets/eth.png b/content/arduino-cloud/02.hardware/04.ethernet/assets/eth.png new file mode 100644 index 0000000000..9b3344b7ad Binary files /dev/null and b/content/arduino-cloud/02.hardware/04.ethernet/assets/eth.png differ diff --git a/content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/ethernet.png b/content/arduino-cloud/02.hardware/04.ethernet/assets/ethernet-option.png similarity index 100% rename from content/arduino-cloud/01.getting-started/01.iot-cloud-getting-started/assets/ethernet.png rename to content/arduino-cloud/02.hardware/04.ethernet/assets/ethernet-option.png diff --git a/content/arduino-cloud/02.hardware/04.ethernet/ethernet.md b/content/arduino-cloud/02.hardware/04.ethernet/ethernet.md new file mode 100644 index 0000000000..884988d031 --- /dev/null +++ b/content/arduino-cloud/02.hardware/04.ethernet/ethernet.md @@ -0,0 +1,45 @@ +--- +title: Ethernet +description: Learn how to configure an Ethernet device in the Arduino Cloud. +tags: [Ethernet, Arduino Cloud, IoT] +author: Karl Söderby +hardware: + - hardware/04.pro/boards/portenta-h7 + - hardware/04.pro/shields/portenta-vision-shield + - hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control + - hardware/07.opta/opta-family/opta +--- + +The Arduino Cloud supports connection via Ethernet on a number of devices. + +## Supported Boards + +The options to connect via Ethernet are the following: +- Connect with the [Portenta H7](https://store.arduino.cc/products/portenta-h7) in combination with an Ethernet-compatible carrier/shield (see below). +- Connect with the [Opta](https://store.arduino.cc/products/opta-wifi). + +To connect with the **Portenta H7** board, you will need one of the following shields/carriers: +- [Portenta Vision Shield Ethernet](https://store.arduino.cc/products/arduino-portenta-vision-shield-ethernet) +- [Portenta Machine Control](https://store.arduino.cc/portenta-machine-control) + +***Please note that older hardware such as the [Ethernet Shield Rev2](https://store.arduino.cc/products/arduino-ethernet-shield-2) and [MKR ETH Shield](https://store.arduino.cc/products/arduino-mkr-eth-shield) are currently not supported by the Arduino Cloud.*** + +## Setup + +To configure Ethernet board, follow the steps below: + +**1.** Connect your board to your computer. + +**2.** Go to [Arduino Cloud](https://app.arduino.cc), and navigate to the **"Devices"** section. Click on the **"Add Device"** button and then select the **"Arduino Board"**. After a while, your board will be visible, and you can click on the **"Configure"** button. + +![Board show up.](assets/eth.png) + +**3.** If you selected an Ethernet compatible board, you will receive an option to choose from **Wi-Fi® / Ethernet**. Choose Ethernet. + +![Choose the Ethernet option.](assets/ethernet-option.png) + +**4.** Allow some time for the configuration, as a sketch is being uploaded to your board and your crypto chip is configured. + +Your board is now configured and ready to be used in the Arduino Cloud. + +To get started, check out the official [Getting Started (Arduino / C++)](/arduino-cloud/guides/arduino-c) guide. This will guide you to successfully send data between your board and Arduino Cloud. \ No newline at end of file diff --git a/content/arduino-cloud/02.hardware/05.cellular/assets/cellular.png b/content/arduino-cloud/02.hardware/05.cellular/assets/cellular.png new file mode 100644 index 0000000000..41f1bada90 Binary files /dev/null and b/content/arduino-cloud/02.hardware/05.cellular/assets/cellular.png differ diff --git a/content/arduino-cloud/02.hardware/05.cellular/cellular.md b/content/arduino-cloud/02.hardware/05.cellular/cellular.md new file mode 100644 index 0000000000..4c32697fdd --- /dev/null +++ b/content/arduino-cloud/02.hardware/05.cellular/cellular.md @@ -0,0 +1,47 @@ +--- +title: NB-IoT / GSM +description: Learn how to configure an NB-IoT / GSM devices in the Arduino Cloud. +tags: [NB-IoT, GSM, Arduino Cloud, IoT] +author: Karl Söderby +hardware: + - hardware/01.mkr/01.boards/mkr-gsm-1400 + - hardware/01.mkr/01.boards/mkr-nb-1500 +--- + +A number of Arduino boards are able to connect to the Arduino Cloud using a sim card, using either the GSM or NB-IoT technologies. + +## Supported Boards + +- [MKR GSM 1400](https://store.arduino.cc/arduino-mkr-gsm-1400) +- [MKR NB 1500](https://store.arduino.cc/arduino-mkr-nb-1500-1413) + +Connection through mobile networks can be considered in remote areas where there's no Wi-Fi, or in mobile projects (such as cargo tracking). + +***For more information, visit the [Arduino SIM page](https://store.arduino.cc/digital/sim).*** + +***Note that a secured connection is a memory intense operation, so there's not a lot of memory for the user application (e.g. around 2.6 kB on the MKR GSM 1400). Using a lot of Arduino Cloud variables may cause the sketch to run out of memory on boards which don't offload the SSL stack and make it crash.*** + +## Setup + +To configure a NB-IoT / GSM board, follow the steps below: + +**1.** Connect your board to your computer. + +**2.** Go to [Arduino Cloud](https://app.arduino.cc), and navigate to the **"Devices"** section. Click on the **"Add Device"** button and then select the **"Arduino Board"**. After a while, your board will be visible, and you can click on the **"Configure"** button. + +![Board show up.](assets/cellular.png) + +**3.** Allow some time for the configuration, as a sketch is being uploaded to your board and your crypto chip is configured. + +Your board is now configured and ready to be used in the Arduino Cloud. + +To get started, check out the official [Getting Started (Arduino / C++)](/arduino-cloud/guides/arduino-c) guide. This will guide you to successfully send data between your board and Arduino Cloud. + +## Network Configuration + +When you attach your board to a Thing, you will need to enter some credentials. With an Arduino SIM, configure it as: + +- **APN** - `prepay.pelion` +- **PIN** - `0000` +- **Username** - `arduino` +- **Password** - `arduino` \ No newline at end of file diff --git a/content/arduino-cloud/02.hardware/hardware.md b/content/arduino-cloud/02.hardware/hardware.md new file mode 100644 index 0000000000..7a6da0a501 --- /dev/null +++ b/content/arduino-cloud/02.hardware/hardware.md @@ -0,0 +1,3 @@ +--- +title: Hardware & Devices +--- \ No newline at end of file diff --git a/content/arduino-cloud/03.cloud-interface/00.sketches/assets/sketch.png b/content/arduino-cloud/03.cloud-interface/00.sketches/assets/sketch.png new file mode 100644 index 0000000000..af1159c5de Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/00.sketches/assets/sketch.png differ diff --git a/content/arduino-cloud/03.cloud-interface/00.sketches/sketches.md b/content/arduino-cloud/03.cloud-interface/00.sketches/sketches.md new file mode 100644 index 0000000000..fe9efe98e2 --- /dev/null +++ b/content/arduino-cloud/03.cloud-interface/00.sketches/sketches.md @@ -0,0 +1,218 @@ +--- +title: Sketches +description: Learn about sketches (programs) in the Arduino Cloud. +tags: [Arduino Cloud, Sketches, IoT Sketches] +author: Karl Söderby +--- + +A sketch is a file where we write programs to run on our Arduino boards. Sketches have a `.ino` extension, which supports the Arduino programming language (a variant of C++). + +The Arduino Cloud has two categories of sketches: +- **Regular sketch** - a single `.ino` file where you write a program. These sketches can be used for **any** Arduino board. +- **IoT Sketch** - a set of files that are automatically generated when creating a [Thing](/arduino-cloud/cloud-interface/things). This includes an `.ino` file and two header (`.h`) files that contain your Thing configuration + credentials. Only available for boards with IoT support. + +In this document we will take a look at how to use sketches in the Arduino Cloud environment. + +***If you need help getting started with programming your Arduino in the online environment, check out the [Cloud Editor](/arduino-cloud/guides/cloud-editor) tutorial.*** + +## Access Your Sketches + +You can access all your sketches at [app.arduino.cc/sketches](https://app.arduino.cc/sketches), where you can easily select between your regular sketches and IoT sketches. + +![Sketches in the Arduino Cloud.](assets/sketch.png) + +Clicking on each sketch will direct you to the [Cloud Editor](https://create.arduino.cc/editor/), which is an online version of the Arduino IDE. Here you can write a program, compile it and upload it to your board. + +***To get started with the Cloud Editor, check out the [Cloud Editor](/arduino-cloud/guides/cloud-editor) tutorial.*** + +## Regular Sketches + +A regular sketch in the Arduino Cloud is exactly like a sketch used in the [Arduino IDE](/software/ide-v2), with no difference whatsoever. You can take a sketch from the online IDE and compile it in the offline IDE. + +A regular sketch only has two minimum requirements: the inclusion of the `void loop()` and `void setup()` functions, which are required for any Arduino sketch. + +```arduino +void setup(){ + //code runs once +} + +void loop(){ + //code loops infinitely +} +``` + +If you are new to the Arduino environment, you can check out the [Language Reference](https://www.arduino.cc/reference/en/), which contains all the functions that you can use for **all** Arduino boards. + +For specific features of a board, make sure to check out the [hardware documentation](/). + +## IoT Sketches + +IoT sketches are more complex and are generated automatically when you create a Thing and variables. + +***Read more about this in the [Automatic Sketch Generation](/arduino-cloud/cloud-interface/sketches) documentation.*** + +### Sketch File + +The sketch file is generated with a set of additional cloud-specific methods included, the essentials being: +- `initProperties()` - initializes properties/variables from your Thing. +- `ArduinoCloud.begin()` starts the library with the preferred connection (e.g. Wi-Fi® or LoRaWAN®). +- `ArduinoCloud.update()` - synchronizes all data between the board and the Arduino Cloud. + +In addition, any variable created with a read/write permission will also generate a callback function that executes whenever the variable's value changes. +- If you create a variable called `test`, the function will render as `void onTestChange(){}` + +Below is an example of how a default sketch looks like: + +```arduino +#include "thingProperties.h" + +void setup(){ + Serial.begin(115200); + delay(1500); + + //initialize the variables/properties + initProperties(); + + //debug information + ArduinoCloud.begin(ArduinoIoTPreferredConnection); + setDebugMessageLevel(2); + ArduinoCloud.printDebugInfo(); +} +void loop() { + //sync with cloud + ArduinoCloud.update(); +} + +void onTestChange(){ + /* + callback function, runs each time + the variable value changes + */ +} +``` + +### Configuration Header File + +The `thingProperties.h` file is a non-editable file that updates based on changes made in your Thing. For example: + +- Creating a variable will add it to this file, along with parameters such as permission, update policy, variable type etc. +- Changing from a Wi-Fi® device to a LoRa® device will update the **connection method** stored in this file, + +The file cannot be edited in the Arduino Cloud as it is in sync with the platform and changes frequently. + +### Secret File + +The "Secret" File contains your secret credentials, such as Wi-Fi® network SSID/PASS or device secret key. + +This file will be visible as a "Secret" tab in the Cloud Editor and is named `arduino_secrets.h`, which is not visible on the cloud platform. + +Note that if you are using the offline IDE / Arduino CLI, you will need to manually create this file. More information is in the **Offline Sketches section** just below. + +## Offline Sketches + +The Arduino Cloud provides an all-inclusive service for programming, uploading and monitoring your boards. While it is necessary to use the Arduino Cloud for configurations, you do not need to use the Cloud Editor for programming. + +It is possible to work in an offline environment (such as Arduino IDE), which for many might be more desirable. To set this up, there are a few requirements and setbacks: +- You need to manually install the [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud) and [Arduino_ConnectionHandler](https://github.com/arduino-libraries/Arduino_ConnectionHandler) libraries, +- you need to either download your sketch files and move them to your local sketch folder (e.g. `~/Documents/Arduino`), **or** +- use the [Remote Sketchbook Feature](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-cloud-sketch-sync) feature. + +The Remote Sketchbook feature is great as you can push/pull your sketches from the Arduino Cloud. So if your `thingProperties.h` file changes, you can pull those changes as well. + +***A very important note on Remote Sketchbook: when you push/pull a sketch, you will overwrite the existing sketch, similarly to how GitHub works, but without the option of retrieving your previous sketch.*** + + +## Recommended Code Practices (IoT Sketches) + +This section highlights some important aspects of writing code with regard to the implementations in the [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud). + +### Watchdog Timer (WDT) + +All Arduino Cloud sketches use a **Watchdog Timer (WDT)** by default. The WDT can be used to automatically recover from hardware faults or unrecoverable software errors. + +A WDT is essentially a countdown timer, whereas it starts counting from a set value, and upon reaching zero, it resets the board. To prevent it from reaching zero, we continuously call it from the `loop()`, using the `ArduinoCloud.update()` function. + +This is why, it is very important to not use any long blocking code in your sketch. For example, using a long `delay()` inside the `loop()` is **strongly discouraged**, as the WDT can reach zero and reset the board. + +The WDT can however be disabled inside of the `setup()` function, by adding the `false` parameter: + +```arduino +ArduinoCloud.begin(ArduinoIoTPreferredConnection, false). +``` + +***You can view the source code of this implementation [here](https://github.com/arduino-libraries/ArduinoIoTCloud/tree/master/src/utility/watchdog).*** + +### Alternatives to Delays + +The `loop()` function includes the `ArduinoCloud.update();` call, which sends data to the cloud and receives updates. To get the best responsiveness in your cloud-connected projects, the `loop()` function should run as fast as possible. This means that no blocking commands should be used inside, and you should prefer a non-blocking programming approach whenever possible. + +A common **blocking pattern** is the use of the `delay()` function which stops the execution of the function for the given time. We strongly advise to **get rid of this function** and achieve the same behavior in a non-blocking way with the `millis()` function as described below. + +Let's see how to blink an LED. The traditional way involves the `delay()` function: + +```arduino +void loop() { + ArduinoCloud.update(); + + digitalWrite(LED_BUILTIN, HIGH); + delay(1000); + digitalWrite(LED_BUILTIN, LOW); + delay(1000); +} +``` + +This works, but it will cause a delay of at least two seconds between one execution of `ArduinoCloud.update()` and the next one, thus causing bad performance of the cloud communication. + +This can be rewritten in a non-blocking way as follows: + +```arduino +void loop() { + ArduinoCloud.update(); + + digitalWrite(LED_PIN, (millis() % 2000) < 1000); +} +``` + +How does this work? It gets the current execution time provided by `millis()` and divides it by 2 seconds. If the remainder is smaller than one second it will turn the LED on, and if it's greater it will turn the LED off. + +For a more complex and commented example, you can have a look at the [BlinkWithoutDelay example](/built-in-examples/digital/BlinkWithoutDelay). + +### I2C Usage + +Components connected via I²C (including the sensors onboard the [MKR IoT Carrier](https://store.arduino.cc/products/arduino-mkr-iot-carrier)) uses the same bus as the **ECCX08** crypto chip. As the crypto chip is an essential part of establishing a connection to the Arduino Cloud (it contains the credentials), it is important that other I²C peripherals are initialized after the connection has been made. + +For example, if you are initializing a library such as [Arduino_MKRENV](https://www.arduino.cc/reference/en/libraries/arduino_mkrenv), your `setup()` should be implemented as: + +```arduino +void setup() { + Serial.begin(9600); + delay(1500); + + initProperties(); + + ArduinoCloud.begin(ArduinoIoTPreferredConnection); + setDebugMessageLevel(2); + ArduinoCloud.printDebugInfo(); + + //initializing the Arduino_MKRENV library + if (!ENV.begin()) { + Serial.println("Failed to initialize MKR ENV shield!"); + while (1); + } +} +``` + + +### Avoid Blocking Serial Communication + +`while(!Serial) {}` loops endlessly until the Serial Monitor is opened. This is a useful practice in cases where you want to see all debug output from the start of the sketch execution. However, when building IoT systems using **`while(!Serial){}` can hinder our project from running autonomously**, stopping the board from connecting to the network and Arduino Cloud before manually opening the Serial Monitor. Therefore, it is recommended to consider removing the `while(!Serial){}` loop if it's not necessary. + +A common trick is to add a **`delay(1500);` command after `Serial.begin(9600);`**. This will slightly slow down the initialization of your device but will give you some time to open the serial monitor when you're interested in seeing its output without losing the very first lines. + +## Create Agent + +The [Arduino Create Agent](https://github.com/arduino/arduino-create-agent) is a single binary that will appear on the menu bar and work in the background. It allows you to use the Arduino Cloud and the Arduino Web Editor to seamlessly upload code to any board directly from the browser. + +Downloading and installing the Arduino Create Agent plugin can be done following [this quick and easy process](https://create.arduino.cc/getting-started/plugin/welcome). + +The full documentation of the [Arduino Create Agent is available here](https://github.com/arduino/arduino-create-agent#readme) for more advanced usage. \ No newline at end of file diff --git a/content/arduino-cloud/03.cloud-interface/01.things/assets/built-in-editor.png b/content/arduino-cloud/03.cloud-interface/01.things/assets/built-in-editor.png new file mode 100644 index 0000000000..299b7fdf58 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/01.things/assets/built-in-editor.png differ diff --git a/content/arduino-cloud/03.cloud-interface/01.things/assets/network-creds.png b/content/arduino-cloud/03.cloud-interface/01.things/assets/network-creds.png new file mode 100644 index 0000000000..38b8732aa5 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/01.things/assets/network-creds.png differ diff --git a/content/arduino-cloud/03.cloud-interface/01.things/assets/tags.png b/content/arduino-cloud/03.cloud-interface/01.things/assets/tags.png new file mode 100644 index 0000000000..d2c356c262 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/01.things/assets/tags.png differ diff --git a/content/arduino-cloud/03.cloud-interface/01.things/assets/thing-interface.png b/content/arduino-cloud/03.cloud-interface/01.things/assets/thing-interface.png new file mode 100644 index 0000000000..08fffd9766 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/01.things/assets/thing-interface.png differ diff --git a/content/arduino-cloud/03.cloud-interface/01.things/things.md b/content/arduino-cloud/03.cloud-interface/01.things/things.md new file mode 100644 index 0000000000..5823dd0325 --- /dev/null +++ b/content/arduino-cloud/03.cloud-interface/01.things/things.md @@ -0,0 +1,134 @@ +--- +title: Things +description: Learn how to configure a Thing, a virtual twin of your hardware device. +tags: [Arduino Cloud, Things] +author: Karl Söderby +--- + +The communication between IoT devices and the Arduino Cloud is handled through something called **Things**. Things are a virtual twin of your hardware/setup, where you perform a lot of the configurations for your projects. + +In the Thing interface you can: +- Create cloud variables that can be synced across devices, +- select the main device you want to associate with, +- enter network credentials (such as Wi-Fi network/password), +- edit & upload sketches to your board, +- set webhooks that trigger whenever data changes, +- edit the timezone. + +## Thing Interface + +The Thing interface is designed for ease-of-use and only has a few sections, which we will now go through. + +![Thing Interface](assets/thing-interface.png) + +- **1. Cloud Variables** - create variables that synchronize between a device and the Arduino Cloud. +- **2. Devices** - configure a device that will be associated with your Thing. +- **3. Network** - network credentials, e.g. Wi-Fi® network/password. +- **4. Setup** - the main configuration space tab. +- **5. Sketch** - access the sketch associated with your Thing. +- **6. Metadata** - metadata such as tags, timezone and Thing ID. + +Below you will find more details on each of the sections. + +## Variables + +The variables section is where you create **"Cloud Variables"**, a variable that exist in the Arduino Cloud as well as on your board/setup, and is synchronized continuously. You can configure a variable to be: +- **Read/Write** - you can interact with the variable from a dashboard, +- **Read Only** - you can only read data from the board. + +When you create a variable, it is automatically\* added to your `thingProperties.h` file, which is included in your Arduino Cloud sketch. This means that you do not need to declare them again. Read more in the [Automatic Sketch Generation](#automatic-sketch-generation) section further down. + +For example, if you want to send temperature values to the cloud from a sensor, all you need to do is: + +```arduino +temperature = sensor.readTemperature(); +``` + +***\*This does not apply to Things that are associated with a manual device (JavaScript, Python) as they have no sketch associated. Read more at [Manual Devices](/arduino-cloud/hardware/devices#manual-devices).*** + +There are a large number of variables available, including basic types such as `int`, `boolean` & `String`, but also complex types that hold multiple values, such as the `ColoredLight` variable. + +Variables of the same type can also be synchronized across all devices. This is done when creating a new variable, where you check the variables you want to sync with. + +***All variables are listed in the [Variables](/arduino-cloud/cloud-interface/variables) section. See [Variable Synchronization](/arduino-cloud/cloud-interface/variables#variable-synchronisation) for linking together your devices' variables.*** + +## Device + +In the device section, you can select either a previously configured device, or configure a new one. Associating a device means your device and Thing are now linked indefinitely until you decide to detach them. + +You can connect one of the following devices: +- [Arduino Wi-Fi® devices](/arduino-cloud/hardware/wifi) - official Arduino devices with a Wi-Fi® enabled module. +- [Arduino LoRaWAN® devices](/arduino-cloud/hardware/lora) - official Arduino devices with a LoRaWAN® module. +- [Third-party ESP32/ESP8266 devices](/arduino-cloud/hardware/wifi) - third party devices with an ESP32/ESP8266 SoC. +- [Manual devices](/arduino-cloud/hardware/devices#manual-devices) - a virtual device using MicroPython, Python or JavaScript. These devices do not have a sketch associated. + +The status of your device is also displayed in this section (online/offline). + +***For more details on how to configure a device, check out the [Devices](/arduino-cloud/hardware/devices) section. The available types and links to individual guides are found there.*** + +## Network + +In the network section, you configure the credentials for your network, such as your Wi-Fi® network, secret key (for ESP32 boards) and other credentials e.g. LoRaWAN® & cellular. The network details are securely stored. + +![Network configuration.](assets/network-creds.png) + +The credentials entered are automatically included in your sketch (see [automatic sketch generation](#automatic-sketch-generation)). + +## Sketch + +The sketch tab contains a built-in editor where you can edit, compile and upload sketches to your devices. + +![Built-in editor.](assets/built-in-editor.png) + +- **1. Verify / Upload** - compile and upload code to your devices. +- **2. Connected devices** - connected devices will appear here. +- **3. Open full editor** - opens the full Cloud Editor. +- **4. Serial Monitor** - view serial data from your device. +- **5. Auto Indentation** - auto indents your code. +- **6. Notifications** - whenever you change something in your Thing, a notification will appear here with the changes made. + +This editor is a mirror of the [Cloud Editor](https://create.arduino.cc/editor/), which you can access via the **"Open Full Editor"** button. + +The editor includes all cores for official Arduino boards, and over 6000+ libraries. Many boards also supports **Over-the-air (OTA)** uploads, which is enabled after your first upload via USB. + +***For more information on the editor, check out the [Cloud Editor](/arduino-cloud/guides/cloud-editor) tutorial.*** + +## Metadata + +In the metadata tab, you will find your **Thing ID**, **Timezone** configuration, timestamp data (creation/last modified). Here you can also create tags. + +### Thing ID + +Your Thing ID can be obtained from your metadata tab, and looks like this: + +``` +cd628fe4-31d1-42a8-bf33-a627997ce602 +``` + +This ID is used when connecting with the [REST API](/arduino-cloud/api/arduino-iot-api) or with the [Arduino CLI](/arduino-cloud/arduino-cloud-cli/getting-started). Using either of these clients provides information about your Thing, such as device associated and cloud variables. + +### Timezone + +You can choose your timezone through a dropdown menu in the metadata tab, which includes many cities in America, Europe, Asia, Africa, Oceania, Atlantic, Pacific and even Antarctica. + +This is particularly important when using the [scheduler](/arduino-cloud/features/cloud-scheduler) feature to trigger events at specific times. + +### Tags + +Tags are used to organize and filter your Things. In a setup with many devices across different locations, this can be particularly useful. When creating a tag, you have two fields: +- **Key** - for example, `location` or `room` +- **Value** - for example, `London` or `Living Room` + +## Automatic Sketch Generation + +Things based on Arduino / C++ (the default way) benefit from **automatic sketch generation**. Whenever the configuration is done in your Thing, the changes are reflected in your sketch files. + +For example: +- Associating a Wi-Fi board will automatically update the connection method. +- Creating a variable will add it to your `thingProperties.h` file. +- Creating a variable with **read/write** permission will also add a callback function at the bottom of your sketch. This will trigger any time the value changes. +- Changing your network credentials will update the `arduino_secrets.h` file. + +This is implemented so that the connection and synchronization between the board and cloud is handled automatically, meaning you do not need to do any networking code when using the Arduino / C++ language. + +***Please note that if you are using an offline environment, [Arduino IDE](/software/ide-v2), changes will only be made in the cloud environment and will manually need to be adjusted. If you plan on using the offline IDE, you make use of the [sketch synchronisation](/software/ide-v2/tutorials/ide-v2-cloud-sketch-sync) feature that allows you to push/pull your cloud sketches from the offline IDE.*** diff --git a/content/arduino-cloud/03.cloud-interface/02.variables/assets/add-variables.png b/content/arduino-cloud/03.cloud-interface/02.variables/assets/add-variables.png new file mode 100644 index 0000000000..836fef2af3 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/02.variables/assets/add-variables.png differ diff --git a/content/arduino-cloud/03.cloud-interface/02.variables/assets/example.png b/content/arduino-cloud/03.cloud-interface/02.variables/assets/example.png new file mode 100644 index 0000000000..ef276c72f1 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/02.variables/assets/example.png differ diff --git a/content/arduino-cloud/03.cloud-interface/02.variables/assets/variable-sync-2.png b/content/arduino-cloud/03.cloud-interface/02.variables/assets/variable-sync-2.png new file mode 100644 index 0000000000..0b03bbc9f7 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/02.variables/assets/variable-sync-2.png differ diff --git a/content/arduino-cloud/03.cloud-interface/02.variables/assets/variable-sync.png b/content/arduino-cloud/03.cloud-interface/02.variables/assets/variable-sync.png new file mode 100644 index 0000000000..14a921098f Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/02.variables/assets/variable-sync.png differ diff --git a/content/arduino-cloud/01.getting-started/06.cloud-variables/hero-banner.png b/content/arduino-cloud/03.cloud-interface/02.variables/hero-banner.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.cloud-variables/hero-banner.png rename to content/arduino-cloud/03.cloud-interface/02.variables/hero-banner.png diff --git a/content/arduino-cloud/01.getting-started/06.cloud-variables/cloud-variables.md b/content/arduino-cloud/03.cloud-interface/02.variables/variables.md similarity index 80% rename from content/arduino-cloud/01.getting-started/06.cloud-variables/cloud-variables.md rename to content/arduino-cloud/03.cloud-interface/02.variables/variables.md index 7d21ec648c..f32a3a952a 100644 --- a/content/arduino-cloud/01.getting-started/06.cloud-variables/cloud-variables.md +++ b/content/arduino-cloud/03.cloud-interface/02.variables/variables.md @@ -1,36 +1,36 @@ --- -title: 'IoT Cloud Variables' -description: 'Learn how to configure and use variables in your Arduino IoT Cloud sketches.' -tags: [IoT Cloud, Variables] +title: 'Cloud Variables' +description: 'Learn how to configure and use variables in your Arduino Cloud sketches.' +tags: [Arduino Cloud, Variables] author: 'Karl Söderby' difficulty: beginner --- ## Overview -An essential component of the [Arduino Cloud](https://create.arduino.cc/iot/) is a **cloud variable**. +Variables are essential components of the [Arduino Cloud](https://app.arduino.cc) and are created and configured inside a **Thing**. -A cloud variable is synced between your Arduino board and the Arduino IoT Cloud. If a variable is updated on your board (like reading a sensor), the Arduino Cloud will also receive this value. Similarly, if you update a variable from the cloud, it also updates on your board. +A cloud variable is synced between your Arduino board and the Arduino Cloud. If a variable is updated on your board (like reading a sensor), the Arduino Cloud will also receive this value. Similarly, if a board receives an update from the cloud, the variable also updates on your board. -As long as your board maintains connection to the Arduino IoT Cloud, variables can be updated. +As long as your board maintains a connection to the Arduino Cloud, the variables will be updated. **In this article, we will cover:** -- How to sync variables between your board and the Arduino IoT Cloud. +- How to sync variables between your board and the Arduino Cloud. - Types of variables and list of available ones. - How to structure a sketch for optimal variable synchronization. - How to synchronize variables between devices. ## Create and Configure Variables -Creating and configuring variables are done inside a **Thing**, starting with the **"Add Variable"** button. +Creating and configuring variables is done inside a **Thing**, starting with the **"Add Variable"** button. This will open a new window where you can do several configurations. -![Click on "Add Variable"](assets/add-vars.png) +![Click on "Add Variable"](assets/add-variables.png) ### Variable Configuration Inside a variable configuration, we have several options: -- **Name:** a friendly name for your variable. No spaces or special characters allowed. +- **Name:** a friendly name for your variable. No spaces or special characters allowed (except underscores). - **(optional) Sync With Other Things:** sync a variable with a variable from another Thing. Whenever one variable updates, the other will follow. - **Type:** type of variable. Choose between three categories. - [**Basic:**](#basic-types) e.g. `float`, `int`, `String`. @@ -46,21 +46,17 @@ Inside a variable configuration, we have several options: ### Automatic Sketch Generation -Whenever you add, change or remove a variable, a file called `thingProperties.h` is updated automatically. This is a configuration file that should always be included in your main sketch (it is generated automatically). +Any variables you add will be automatically added to your [thingProperties](/arduino-cloud/cloud-interface/sketches#configuration-header-file) file, which contains any configurations made inside your Thing. -Since it is defined in `thingProperties.h`, you do not need to declare it in your `.ino` file. - -Let's say we create an integer variable called `sensor_value`. To use this in a sketch, we simply use: +E.g. adding an integer variable called `test_value`, allows you to use it in your sketch without defining it. ```arduino -sensor_value = analogRead(A0); +test_value = 1; ``` -We do not need to define the variable anywhere, as it has already been configured in `thingProperties.h`. - -***Note that if you change a variable, you will need to upload the code to your board for the effects to come in change.*** +***Read more about it in the [IoT Sketches](/arduino-cloud/cloud-interface/sketches#iot-sketches) section.*** -### Generated Functions +### Callback Functions When creating a variable with a **Read & Write** permission, a function is generated at the bottom of your sketch. @@ -79,13 +75,13 @@ void onButtonSwitch(){ } ``` -## How is Data Synchronized? +## Cloud Updates Data between a board and the cloud synchronizes whenever the `ArduinoCloud.update()` function is executed. This is automatically included in your sketch, inside the `void loop()`. It is a good practice to **not** use the `delay()` function in a cloud sketch. Please refer to the [millis()](https://www.arduino.cc/reference/en/language/functions/time/millis/) function that can be used to create non-blocking delays. -Below is an example on how to use the `millis()` function: +Below is an example of how to use the `millis()` function: ```arduino unsigned long previousMillis = 0; @@ -104,22 +100,52 @@ void loop(){ //code here will update every 1 second //without blocking the program and the cloud update } +} ``` -***Note that a variable's sync between a board and the cloud is limited to two message per second (500ms)*** +***Note that a variable's sync between a board and the cloud is limited to two messages per second (500ms)*** + +## Variable Synchronisation + +It is possible to sync (link) one or many variables across different Things, a feature that enables bi-directional communication between devices, without writing a single line of code! + +To enable variable synchronization, create a new variable, and click on the "Sync with other Things" option. + +![](assets/variable-sync.png) + +Then select the variables you want to synchronize. They need to be of the same type (you can't link an integer to a boolean for example). + +![](assets/variable-sync-2.png) + +Whenever one variable updates, any variables added to the synchronisation will also update. In the graphic below we demonstrate how two Things could be set up: +- `switch_1` is synced with `light_1`. This is a typical remote light switch. +- `temperature` variables are **not linked**. +- `fan_control` is synced with `fan_speed`. This could be a potentiometer that remotely controls the speed of a fan. + +![Variable synchronisation.](assets/example.png) + +***For more details on this feature, check out the [Device to Device](https://docs.arduino.cc/arduino-cloud/features/device-to-device) tutorial.*** + +## Variable Lifecycle -### Sync Variables Between Things +Cloud variables are only synced with the Arduino Cloud during the **Synchronized** status. +When we are in a different state, any change to the variable is local and will be overridden by the Arduino Cloud value as soon as it gets Synchronized. -It is possible to sync one or many variables with each other, between Things. This is the easiest method available to connect two Arduino board devices, wirelessly. +A variable can be in any of the following stages: -This is done in the configuration of a variable, in the **Sync With Other Things** option. +- **Disconnected** - The variable has the local value. Any modification to the value will be overridden once Synchronized. +- **Connecting** - The variable has the local value. Any modification to the value will be overridden once Synchronized. +- **Connected** - The variable has the local value. Any modification to the value will be overridden once Synchronized. +- **Synchronized** - The variable is synced with the Cloud. + - If the value is changed locally, it is populated to the Cloud. + - If the value is changed in the Cloud via a dashboard or variable sync, the local value is updated (only for **Read Write** variables). -***To learn how to use this feature, read the [Device to Device](https://docscontent-karlsoderbyvariablesarticle.gtsb.io/arduino-cloud/features/device-to-device) tutorial.*** +***For callbacks & events depending on what status the variable is in, check out the [Events & Callbacks](/arduino-cloud/api/c-library#events--callbacks) section.*** -## List of Variables +## Cloud Variable List -Cloud variables are divided into three categories: **basic, specialized** and **complex** types. +Cloud variables are divided into three categories: **basic, specialized** and **complex** types. Below you will find all available variables that you can create. ### Basic Types @@ -137,7 +163,7 @@ All available basic variables are listed below: Specialized types are wrappers around basic types but declare the variable semantics more explicitly. This enables smarter integrations with third-party services (such as Alexa) and better visualization of widgets in dashboards. -You can use them just like a normal variable of the wrapped type, since they support assignment and comparison operators. +You can use them just like a normal variable of the wrapped type since they support assignment and comparison operators. | Type | Declaration | Wrapped data type | | -------------------- | ---------------------------------------- | ----------------- | @@ -180,7 +206,7 @@ You can use them just like a normal variable of the wrapped type, since they sup ### Complex Types -The following variable types hold multiple values internally and are used to represent more complex data. In order to access such values, methods are provided. +The following variable types hold multiple values internally and are used to represent more complex data. To access such values, methods are provided. #### CloudSchedule @@ -193,7 +219,7 @@ The following variable types hold multiple values internally and are used to rep | To (end date)\* | `int` | `x.getCloudValue().to` | | Length of Timestamp | `int` | `x.getCloudValue().len` | -\*If no end date is selected, value is defaulted to `0`. +\*If no end date is selected, the value is defaulted to `0`. #### DimmedLight @@ -229,7 +255,7 @@ To read the Color values, we can use the following method `Color colorValues = x | Brightness | `float` (0-100) | `colorValues.bri` | `x = Color(hue,saturation,brightness)` | | Color | `uint8_t` (0-255) | `x.getRGB(r,g,b)` | `x.set(r,g,b)` | -To set the color, we can assign the CloudColor variable directly to float variables `x = {hue,saturation,brightness}`, or using the method ` x = Color(hue,saturation,brightness)`. +To set the color, we can assign the CloudColor variable directly to float variables `x = {hue,saturation,brightness}`, or use the method ` x = Color(hue,saturation,brightness)`. #### CloudLocation @@ -263,7 +289,7 @@ Here are some examples of how to use the variables in a sketch: ### Basic Types -The below example shows how to use some of the basic types. Remember that cloud variables are configured in the Arduino IoT cloud, and generated into your Thing's `thingProperties.h` file. +The example below shows how to use some of the basic types. Remember that cloud variables are configured in the Arduino Cloud, and generated into your Thing's `thingProperties.h` file. In this example, we are using the following cloud variables: @@ -283,7 +309,7 @@ void setup() { // Defined in thingProperties.h initProperties(); - // Connect to Arduino IoT Cloud + // Connect to Arduino Cloud ArduinoCloud.begin(ArduinoIoTPreferredConnection); setDebugMessageLevel(2); ArduinoCloud.printDebugInfo(); @@ -324,7 +350,7 @@ void setup() { // Defined in thingProperties.h initProperties(); - // Connect to Arduino IoT Cloud + // Connect to Arduino Cloud ArduinoCloud.begin(ArduinoIoTPreferredConnection); setDebugMessageLevel(2); ArduinoCloud.printDebugInfo(); @@ -363,7 +389,7 @@ void onCLightChange() { ### Television -CloudTelevision is an automation variable declared automatically in the `thingProperties.h` file as `CloudTelevision variableName;`. The example below shows how the CloudTelevision variable (declared with the variableName `tv`) can be used and modified in the sketch. The example simulates a remote controller by using an IR receiver to read the signals sent from the a remote controller and save them in arrays of unsigned integers. An IR transmitter is then used to send IR signals using the Arduino IoT Cloud. To view the full documentation of the project, [you can check this page](https://create.arduino.cc/projecthub/313276/full-control-of-your-tv-using-alexa-and-arduino-iot-cloud-9e7c4d). +CloudTelevision is an automation variable declared automatically in the `thingProperties.h` file as `CloudTelevision variableName;`. The example below shows how the CloudTelevision variable (declared with the variableName `tv`) can be used and modified in the sketch. The example simulates a remote controller by using an IR receiver to read the signals sent from the remote controller and save them in arrays of unsigned integers. An IR transmitter is then used to send IR signals using the Arduino Cloud. Note that the `onTvChange()` function is automatically added and is triggered whenever the value of the tv variable is updated in the Cloud. @@ -395,7 +421,7 @@ void setup() { // Defined in thingProperties.h initProperties(); - // Connect to Arduino IoT Cloud + // Connect to Arduino Cloud ArduinoCloud.begin(ArduinoIoTPreferredConnection); setDebugMessageLevel(2); ArduinoCloud.printDebugInfo(); @@ -508,7 +534,7 @@ void onTvChange() { ## Alexa Variables -The integration between Alexa & Arduino IoT Cloud supports a limited amount of variables, see the list below: +The integration between Alexa & Arduino Cloud supports a limited amount of variables, see the list below: - [Colored Light](#coloredlight) - `bool` and `float` (complex type). - [Dimmed Light](#dimmedlight) - `bool` and `float` (complex type). @@ -522,12 +548,12 @@ The integration between Alexa & Arduino IoT Cloud supports a limited amount of v Other variables used will not appear in the Amazon Alexa app. -***To synchronize your Arduino Cloud with the Amazon Alexa service, you can check out the [Arduino Cloud Alexa Tutorial](/arduino-cloud/tutorials/alexa-mkr-rgb-shield).*** +***To synchronize your Arduino Cloud with the Amazon Alexa service, you can check out the [Arduino Cloud Alexa Tutorial](/arduino-cloud/guides/alexa).*** ## Summary -In this article, we have covered how to use variables in the Arduino IoT Cloud, and what variables are available. +In this article, we have covered how to use variables in the Arduino Cloud, and what variables are available. We have also shown some code examples and good practices to keep variable synchronization optimal, such as using the `millis()` function. -The use of cloud variables is almost identical to how you use variables in a regular sketch, with the exception that they are synchronized with the Arduino IoT Cloud. \ No newline at end of file +The use of cloud variables is almost identical to how you use variables in a regular sketch, with the exception that they are synchronized with the Arduino Cloud. \ No newline at end of file diff --git a/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/dashboard.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/dashboard.png new file mode 100644 index 0000000000..1c23cc2e51 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/dashboard.png differ diff --git a/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/edit-view-mobile.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/edit-view-mobile.png new file mode 100644 index 0000000000..18f489f3ec Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/edit-view-mobile.png differ diff --git a/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/scaling.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/scaling.png new file mode 100644 index 0000000000..1ae857ad16 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/scaling.png differ diff --git a/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/share-dashboard.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/share-dashboard.png new file mode 100644 index 0000000000..44eb3d6291 Binary files /dev/null and b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/share-dashboard.png differ diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/time-picker.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/time-picker.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/time-picker.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/time-picker.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-advanced-chart-2.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-advanced-chart-2.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-advanced-chart-2.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-advanced-chart-2.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-advanced-chart.gif b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-advanced-chart.gif similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-advanced-chart.gif rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-advanced-chart.gif diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-chart.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-chart.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-chart.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-chart.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-color-light.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-color-light.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-color-light.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-color-light.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-color.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-color.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-color.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-color.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-dimmed-light.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-dimmed-light.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-dimmed-light.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-dimmed-light.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-dropdown.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-dropdown.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-dropdown.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-dropdown.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-gauge.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-gauge.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-gauge.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-gauge.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-led.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-led.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-led.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-led.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-map.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-map.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-map.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-map.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-messenger.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-messenger.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-messenger.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-messenger.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-percentage-1.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-percentage-1.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-percentage-1.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-percentage-1.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-percentage-2.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-percentage-2.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-percentage-2.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-percentage-2.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-pushbutton.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-pushbutton.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-pushbutton.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-pushbutton.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-scheduler.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-scheduler.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-scheduler.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-scheduler.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-slider.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-slider.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-slider.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-slider.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-status.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-status.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-status.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-status.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-stepper.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-stepper.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-stepper.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-stepper.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-sticky-note.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-sticky-note.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-sticky-note.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-sticky-note.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-switch.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-switch.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-switch.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-switch.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-value-picker.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-value-picker.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-value-picker.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-value-picker.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-value.png b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-value.png similarity index 100% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/assets/widget-value.png rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/assets/widget-value.png diff --git a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/dashboard-widgets.md b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/dashboard-widgets.md similarity index 65% rename from content/arduino-cloud/01.getting-started/06.dashboard-widgets/dashboard-widgets.md rename to content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/dashboard-widgets.md index ea9008538a..11dd9f005e 100644 --- a/content/arduino-cloud/01.getting-started/06.dashboard-widgets/dashboard-widgets.md +++ b/content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/dashboard-widgets.md @@ -1,55 +1,82 @@ --- -title: 'IoT Cloud Dashboards & Widgets' +title: 'Dashboards & Widgets' description: 'Learn about dashboards and the different widgets that can be used to monitor & control your board.' -tags: [IoT Cloud, Widgets, Dashboards] +tags: [Arduino Cloud, Widgets, Dashboards] author: 'Karl Söderby' difficulty: beginner --- -## Overview +Dashboards in the [Arduino Cloud](https://cloud.arduino.cc/home/) are used to easily monitor & control your Arduino boards from a web interface. Dashboards are not linked to one specific Thing or device, you can control all of them through one single dashboard. -Dashboards in the [Arduino Cloud](https://cloud.arduino.cc/home/) are used to easily monitor & control your Arduino board from a web interface. In this article, we will take a look at what a dashboard is, what widgets are, and learn how they interface with an Arduino board. +Dashboards are composed of [widgets](#widgets), which are directly linked to a variable. Whenever a variable is updated, so is the widget. -***If you are new to the Arduino Cloud, make sure you read the [Getting Started with the Arduino Cloud](/arduino-cloud/getting-started/iot-cloud-getting-started) article.*** +## Dashboards -### What is a Dashboard? +![Widgets in a dashboard.](assets/dashboard.png) -![Widgets in a dashboard.](assets/cloud-widgets.png) +A dashboard consists of one or several **widgets** that are linked with your cloud variables. You can for example set up a switch to turn on/off a light, a gauge that displays temperature, or a chart that shows data over time. -A dashboard consist of one or several **widgets** that are linked with your cloud variables. You can for example, set up a switch to turn on/off a light, a gauge that displays temperature, or a chart that shows data over time. +Dashboards are not tied to one Thing, or one device, and they can be used to control and monitor several devices simultaneously. For example, you can have 10 devices monitoring temperature in different parts of the world, and the data is displayed in one single dashboard. -Dashboards are not tied to one Thing, or one device, and it can be used to control and monitor several devices simultaneously. For example, you can have 10 devices monitoring temperature in different parts of the world, and the data displayed in one single dashboard. +***Deleting dashboards / widgets does not impact the functionality of your Thing & device. This means that you can safely edit your dashboards & widgets while your device is streaming data. It does however remove the historical data of that Widget.*** -***Deleting dashboards / widgets does not impact the functionality of your Thing & device. This means that you can safely edit your dashboards & widgets while your device is streaming data.*** +## IoT Remote App -### What is a Widget? +The **IoT Remote App** is a mobile version of your dashboards, that can be downloaded through: +- [Google Play Store](https://play.google.com/store/apps/details?id=cc.arduino.cloudiot&hl=en&gl=US) +- [Apple App store](https://apps.apple.com/us/app/arduino-iot-cloud-remote/id1514358431) -Widgets are the building blocks of your dashboard, and can be used to either visualize data or to interact with your board. Widgets are linked to a single cloud variable, and as that variable updates, the widget will as well. +***For more information, visit the [IoT Remote App docs](/arduino-cloud/iot-remote-app/getting-started).*** -There are many different widgets available that fits different types of uses, such as: +## Edit / View Modes + +Dashboards have two modes, **edit** and **view**. For configuring the dashboard, you use the edit mode. + +In both modes, you can also click the **Mobile Layout** icon, to see how the widgets will be viewed on your IoT Remote App. + +![Edit / View modes and mobile layout.](assets/edit-view-mobile.png) + +While in **edit mode**, you can create widgets, link them to variables, move widgets around and lock them in place. Widgets can be scaled and customized to your liking. A switch widget can for example be adjusted from a 1x1 to 5x5 size. + +![Scaling widgets.](assets/scaling.png) + + +In **viewing** mode, you can only monitor/interact with your widgets. + +## Sharing Dashboards + +You can share your live dashboards with other people, allowing them to monitor and interact with your devices. Note that you need a [maker plan](https://cloud.arduino.cc/plans) to use this feature. + +![Share your dashboards.](assets/share-dashboard.png) + +***Read more at [Sharing Dashboards in the Arduino Cloud](/arduino-cloud/features/sharing-dashboards).*** + +## Widgets + +Widgets are the building blocks of your dashboard and can be used to either visualize data or interact with your board. Widgets are linked to a single cloud variable, and as that variable updates, the widget will as well. + +There are many different widgets available that fit different types of uses, such as: - **Gauge** - displaying data in a "gauge" style. - **Switch** - for switching a boolean, i.e. turning something on/off. - **Map** - display the location of your Thing. - **Messenger** - to display or send strings to your board. -Full list of widgets and how to use them are available in the [List of Widgets](#list-of-widgets) . +A full list of widgets and how to use them is available in the [List of Widgets](#list-of-widgets) . -### Downloading Historical Data +### Link Widgets & Variables -Data that is streamed to a widget is also available for download. The data retention rate depends on your Arduino Cloud plan. For example, an **entry plan** has a data retention of 15 days. You can download it as an `.csv` file that can easily be used with Excel, Google Sheets etc. -***Learn more about downloading data in the [Historical Data on the Arduino IoT Cloud](/arduino-cloud/features/iot-cloud-historical-data) tutorial.*** +### Download Historical Data -### Sharing Dashboards +Data which is streamed to a widget is also available for download. The data retention rate depends on your Arduino Cloud plan. For example, an **entry plan** has a data retention of 15 days. You can download it as an `.csv` file that can easily be used with Excel, Google Sheets etc. -It is possible to share your live dashboards with external people. To do so, please refer to the guide in the link below: +***Learn more about downloading data in the [Historical Data on the Arduino Cloud](/arduino-cloud/features/iot-cloud-historical-data) tutorial.*** -- [Sharing Dashboards in the Arduino IoT Cloud](/cloud/iot-cloud/tutorials/sharing-dashboards) ## List of Widgets -Below you will find a list of available widgets, and examples on how they are linked to a variable used in a sketch. +Below you will find a list of available widgets and examples on how they are linked to a variable used in a sketch. ### Switch @@ -206,7 +233,7 @@ An example of how it is used in a sketch: ![Colored Light Widget](assets/widget-color-light.png) -The colored light widget is designed to set the color for a lamp, and can turn it ON and OFF as well. +The colored light widget is designed to set the color of a lamp and turn it ON or OFF. Can be linked with a **Colored Light** variable. @@ -221,7 +248,7 @@ rgbVariable.getValue().getRGB(r, g, b); ![Value Widget](assets/widget-value.png) -The value widget is a simple one. It only reads, or writes values without any additional functionalities. +The value widget is a simple one. It only reads or writes values without any additional functionalities. Can be linked with many different variables. @@ -235,7 +262,7 @@ valueVariable = analogRead(A0); ![Status Widget](assets/widget-status.png) -The status widget is great for checking the state of something: green is positive, red is negative! +The status widget is great for checking the state of something: green is true, red is false! Can be linked to a **boolean** variable. @@ -265,9 +292,9 @@ gaugeVariable = analogRead(A0); ![Percentage Widget](assets/widget-percentage-1.png) -The percentage widget displays values as percentage, with the option of adding **icons** and **color thresholds**. +The percentage widget displays values as percentages, with the option of adding **icons** and **color thresholds**. -In the widget settings, you can choose from a range of icons, as well as a color that should be visible whenever a value is e.g. below a certain value. +In the widget settings, you can choose from a range of icons, as well as a color that should be visible whenever a value is e.g. below a certain value. ![Configuration of a Percentage Widget.](assets/widget-percentage-2.png) @@ -299,7 +326,7 @@ ledVariable = false; ![Map Widget](assets/widget-map.png) -The map widget is a tool for keeping track on the location of your projects. This is a great tool for any project involving GPS, or to get an overview of where your Thing, or multiple Things are operating. +The map widget is a tool for keeping track of the location of your projects. This is a great tool for any project involving GPS, or to get an overview of where your Thing, or multiple Things are operating. Can be linked with the **Location** variable. @@ -313,7 +340,7 @@ locationVariable = Location(51.5074, 0.1278); ![Chart Widget](assets/widget-chart.png) -The chart widget is great for data analytics. It is used to track real time data, as well as tracking historical data. This widget can for example be used to track temperature changes, energy consumption and other sensor values. A chart widget can only be linked to one variable at a time. +The chart widget is great for data analytics. It's used to track real-time data, and track historical data. This widget can for example be used to track temperature changes, energy consumption and other sensor values. A chart widget can only be linked to one variable at a time. An example of how it is used in a sketch: @@ -367,7 +394,7 @@ if(scheduleVariable.isActive){} The sticky note widget can be used to write important notes or to categorize your widgets. -The sticky note can **not** be linked with a variable, and is designed to keep notes only while using a dashboard. It does support the use of markdown, so that you can create titles, links, code blocks etc. +The sticky note can **not** be linked with a variable and is designed to keep notes only while using a dashboard. It does support the use of markdown so that you can create titles, links, code blocks etc. ### Value Selector @@ -391,7 +418,7 @@ if(valueSelector == "string"){ ![Value Dropdown](assets/widget-dropdown.png) -The value dropdown widget works similarly to **value selector**, and is be used to switch between predetermined values through a dropdown menu. Supported variable types are `int` and `String`. +The value dropdown widget works similarly to the **value selector** and can be used to switch between predetermined values through a dropdown menu. Supported variable types are `int` and `String`. Example: diff --git a/content/arduino-cloud/02.features/10.triggers/assets/activateTrigger.png b/content/arduino-cloud/03.cloud-interface/04.triggers/assets/activateTrigger.png similarity index 100% rename from content/arduino-cloud/02.features/10.triggers/assets/activateTrigger.png rename to content/arduino-cloud/03.cloud-interface/04.triggers/assets/activateTrigger.png diff --git a/content/arduino-cloud/02.features/10.triggers/assets/addTrigger.png b/content/arduino-cloud/03.cloud-interface/04.triggers/assets/addTrigger.png similarity index 100% rename from content/arduino-cloud/02.features/10.triggers/assets/addTrigger.png rename to content/arduino-cloud/03.cloud-interface/04.triggers/assets/addTrigger.png diff --git a/content/arduino-cloud/02.features/10.triggers/assets/emailForm.png b/content/arduino-cloud/03.cloud-interface/04.triggers/assets/emailForm.png similarity index 100% rename from content/arduino-cloud/02.features/10.triggers/assets/emailForm.png rename to content/arduino-cloud/03.cloud-interface/04.triggers/assets/emailForm.png diff --git a/content/arduino-cloud/02.features/10.triggers/assets/linkVariable.png b/content/arduino-cloud/03.cloud-interface/04.triggers/assets/linkVariable.png similarity index 100% rename from content/arduino-cloud/02.features/10.triggers/assets/linkVariable.png rename to content/arduino-cloud/03.cloud-interface/04.triggers/assets/linkVariable.png diff --git a/content/arduino-cloud/02.features/10.triggers/assets/selectAction.png b/content/arduino-cloud/03.cloud-interface/04.triggers/assets/selectAction.png similarity index 100% rename from content/arduino-cloud/02.features/10.triggers/assets/selectAction.png rename to content/arduino-cloud/03.cloud-interface/04.triggers/assets/selectAction.png diff --git a/content/arduino-cloud/02.features/10.triggers/assets/selectVariable.png b/content/arduino-cloud/03.cloud-interface/04.triggers/assets/selectVariable.png similarity index 100% rename from content/arduino-cloud/02.features/10.triggers/assets/selectVariable.png rename to content/arduino-cloud/03.cloud-interface/04.triggers/assets/selectVariable.png diff --git a/content/arduino-cloud/02.features/10.triggers/assets/triggerHomepage.png b/content/arduino-cloud/03.cloud-interface/04.triggers/assets/triggerHomepage.png similarity index 100% rename from content/arduino-cloud/02.features/10.triggers/assets/triggerHomepage.png rename to content/arduino-cloud/03.cloud-interface/04.triggers/assets/triggerHomepage.png diff --git a/content/arduino-cloud/02.features/10.triggers/triggers.md b/content/arduino-cloud/03.cloud-interface/04.triggers/triggers.md similarity index 66% rename from content/arduino-cloud/02.features/10.triggers/triggers.md rename to content/arduino-cloud/03.cloud-interface/04.triggers/triggers.md index 8d25a0a840..7ae8fe3901 100644 --- a/content/arduino-cloud/02.features/10.triggers/triggers.md +++ b/content/arduino-cloud/03.cloud-interface/04.triggers/triggers.md @@ -2,36 +2,36 @@ title: Triggers description: Learn how to use triggers that allow you to send notifications based on set conditions. author: Hannes Siebeneicher -tags: [IoT Cloud, Triggers, Cloud Notification] +tags: [Arduino Cloud, Triggers, Cloud Notification] --- -Triggers react to certain conditions inside your IoT Cloud Thing, such as a boolean being true, or a string being assigned a value. As soon as a set condition is met a notification gets triggered and send to you. This is super useful when you monitor data and you need to know about any change as soon as it happens. This could be anything from different values in environmental monitoring or something security related such as movement detection. +Triggers react to certain conditions inside your Arduino Cloud Thing, such as a boolean being true, or a string being assigned a value. As soon as a set condition is met a notification gets triggered and sent to you. This is useful when you monitor data and you need to know about any change as soon as it happens. This could be anything from different values in environmental monitoring or security-related information such as movement detection. Triggers can be set up for any of your existing projects, and are found in the [cloud home section](https://cloud.arduino.cc/home/). ## Hardware & Software Needed -- [Arduino IoT Cloud](https://create.arduino.cc/iot/) (Maker plan). -- Cloud-compatible boards, [see full list](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started#compatible-hardware). +- [Arduino Cloud](app.arduino.cc) (Maker plan). +- Cloud-compatible boards, [see full list](https://docs.arduino.cc/arduino-cloud/guides/overview#compatible-hardware). -***In this tutorial, we use the [Nano 33 IoT](https://store.arduino.cc/products/arduino-nano-33-iot?queryID=undefined). This is not a requirement, you can use any IoT Cloud-compatible board for this tutorial.*** +***In this tutorial, we use the [Nano 33 IoT](https://store.arduino.cc/products/arduino-nano-33-iot). This is not a requirement, you can use any Arduino Cloud-compatible board for this tutorial.*** ## Setup & Configuration ## Limitations -Currently the only variables supported by the trigger feature are: +Currently, the only variables supported by the trigger feature are: - Booleans - Strings ## Setup & Configuration -***If you are unfamiliar with how to set up a Thing and variables, head on over to the [Getting Started with the Arduino IoT Cloud](/arduino-cloud/getting-started/iot-cloud-getting-started) article.*** +***If you are unfamiliar with how to set up a Thing and variables, head on over to the [Getting Started with the Arduino Cloud](/arduino-cloud/guides/overview) article.*** **1.** Head over to the Things tab and create a new Thing, create a variable, and set up your device including a working network connection. -**2.** Upload your code to the board you want to use. For demonstration purposes, we'll use a [simple button](#example-code) sketch setting our button boolean equal to true each time a button connected to Pin D3 is pressed. You can of course set this up in whatever way you'd like. +**2.** Upload your code to the board you want to use. For demonstration purposes, we'll use a [simple button](#example-code) sketch setting our button boolean to true each time a button connected to Pin D3 is pressed. You can of course set this up in whatever way you'd like. **3.** Go to [Arduino Cloud home](https://cloud.arduino.cc/home/) and click on **Triggers**. @@ -62,7 +62,7 @@ You can even include **dynamic data** such as `{variable.timestamp}` or `{variab ![Activate Trigger](./assets/activateTrigger.png) -**8.** Try it out! Press the button and within a couple of seconds, you should receive an email telling you that the trigger has been activated showing you the message that you create in the previous step. +**8.** Try it out! Press the button and within a couple of seconds, you should receive an email telling you that the trigger has been activated showing you the message that you created in the previous step. ## Example Code @@ -82,12 +82,12 @@ void setup() { // Defined in thingProperties.h initProperties(); - // Connect to Arduino IoT Cloud + // Connect to Arduino Cloud ArduinoCloud.begin(ArduinoIoTPreferredConnection, false, "mqtts-sa.iot.oniudra.cc"); /* The following function allows you to obtain more information - related to the state of network and IoT Cloud connection and errors + related to the state of network and Arduino Cloud connection and errors the higher number the more granular information you’ll get. The default is 0 (only errors). Maximum is 4 @@ -118,10 +118,10 @@ void loop() { Here are some suggestions for potential projects that utilize **Triggers** in a project: -- A PIR detecting motion, sending a notification as soon as the sensor is triggered. +- A motion-detecting PIR, sending a notification as soon as the sensor is triggered. - An automated plant monitoring setup sending a notification as soon as your plants need water. - An environmental data collection setup notifying you as soon as the values reach a certain threshold. ## Summary -Triggers are a simple but extremely powerful feature allowing you to stay on track with all your Arduino IoT Cloud projects. Instead of constantly checking your dashboards to see the newest update just create a trigger notifying you as soon as changes occur. In this tutorial, we used just **one trigger** in combination with a simple demo sketch but you can create **as many Triggers as you need** to automate your projects. \ No newline at end of file +Triggers are a simple but extremely powerful feature allowing you to stay on track with all your Arduino Cloud projects. Instead of constantly checking your dashboards to see the newest update just create a trigger notifying you as soon as changes occur. In this tutorial, we used just **one trigger** in combination with a simple demo sketch but you can create **as many Triggers as you need** to automate your projects. \ No newline at end of file diff --git a/content/arduino-cloud/03.cloud-interface/cloud-interface.md b/content/arduino-cloud/03.cloud-interface/cloud-interface.md new file mode 100644 index 0000000000..670ba4d889 --- /dev/null +++ b/content/arduino-cloud/03.cloud-interface/cloud-interface.md @@ -0,0 +1,3 @@ +--- +title: Cloud Interface +--- \ No newline at end of file diff --git a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/alexa-mkr-rgb-shield.md b/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/alexa-mkr-rgb-shield.md deleted file mode 100644 index 2e0b83e246..0000000000 --- a/content/arduino-cloud/03.tutorials/alexa-mkr-rgb-shield/alexa-mkr-rgb-shield.md +++ /dev/null @@ -1,265 +0,0 @@ ---- -title: 'Alexa & Arduino IoT Cloud Integration' -compatible-products: [mkr-wifi-1010, mkr-rgb-shield] -difficulty: intermediate -description: 'Learn how to build a smart lamp by integrating the Arduino IoT Cloud and Alexa.' -tags: -- Alexa -- Smart lamp -author: 'Karl Söderby' -featuredImage: 'cloud' ---- - -## Introduction - - - -In this tutorial you will learn how to integrate the [Arduino IoT Cloud](https://create.arduino.cc/iot/) with the [Amazon Alexa skill](https://www.amazon.com/Arduino-LLC/dp/B07ZT2PK2H). At the end of this tutorial, we will be able to change the color of an RGB matrix, using only voice commands in the Alexa app. - -This tutorial focuses on using the [MKR RGB Shield](https://store.arduino.cc/products/arduino-mkr-rgb-shield) but can easily be modified to use other matrices. - -***While this tutorial focuses on creating a smart lamp, it also shows the steps needed to integrate the two services, so you can essentially follow this tutorial to create other cool projects!*** - -***You can also find all variables that can be synchronized between Arduino Cloud and Alexa in the [IoT Cloud Variables guide](/arduino-cloud/getting-started/cloud-variables#alexa-variables).*** - -## Goals - -The goals of this project are: - -- Set up the Arduino IoT Cloud. -- Create a program that controls the RGB pixels. -- Install the Arduino Skill on the Alexa app. -- Sync the Arduino IoT Cloud with Alexa. - -## Hardware & Software Needed - -- [Arduino IoT Cloud](https://create.arduino.cc/iot/) -- [Amazon Alexa skill](https://www.amazon.com/Arduino-LLC/dp/B07ZT2PK2H) -- [Arduino MKR WiFi 1010](https://store.arduino.cc/mkr-wifi-1010). -- [MKR RGB Shield](https://store.arduino.cc/arduino-mkr-rgb-shield) - -## Circuit - -Simply mount the MKR RGB Shield on top of the MKR WiFi 1010. - -![Mounting the shield.](assets/alexa-mkr-rgb-shield-img-01.png) - -## Step 1: Setting up the Arduino IoT Cloud - -Let's start by navigating to the Arduino IoT Cloud. - ->**Note:** You will need a Arduino account to use the Arduino IoT Cloud. If you do not have one, you will be directed to the account registration. - -### Configure a New Device - -Once we are in the Arduino IoT Cloud, we will need to click on the **"Devices"** tab. This will open a new page which will ask you to add a new device. Click on the **"Add device"** button. - -![Adding a new device.](assets/new_device.png) - -You will now have an option of either configuring a new Arduino device, or a third party device. Select the **"Set up an Arduino device** option. - -![Selecting the type of device.](assets/device_setup_1.png) - -At this point, you will need to connect your cloud compatible board to your computer. You will also need to have installed the Arduino Create Agent. If if it is not installed, the set up wizard will ask you to install it. Your device should now show up, and you will need to click on the **"Configure"** -button. - - -![Device found.](assets/device_setup_2.png) - -You will now be asked to name your device. In this case, a name was randomly generated, which is **Phil**. Click on **"Next"** to proceed. - -![Naming the device.](assets/device_setup_3.png) - -After clicking on next, the board will start to configure. This process may take a few minutes. - -![The configuration process.](assets/device_setup_4.png) - -Once it is done, we will be directed to the devices page, where we can see our device. Congratulations, you have just made your first device IoT ready! - -![Configuration complete!](assets/device_overview.png) - -### Creating a Thing and Linking Your Device - -After our device is configured, we can move on to the next step: creating our very first Thing. Click on the **"Things"** tab. You should now see a button that says **"Create thing"**, which we will need to click. - -![Creating a thing.](assets/new_thing.png) - -We will now see an interface with multiple options. This is your Thing configuration overview. Here we can select what network we are connecting to, what device we are using and create variables that we want to sync. - -![Overview of a Thing.](assets/thing_overview.png) - -Let's start by linking our freshly configured device, by clicking on the **"Select Device"** button to the right. This will open up a window, where we can **"Associate"** the board with this Thing. - -![Associating the device.](assets/associate_device.png) - -### Creating the RGB variable - -After our device is configured, we need to create the variable that will store the R, G, B data that will be retrieved from Alexa. Click on the **"Add Variable"** button in the Thing overview. - -![The "Add Variable" button.](assets/alexa-mkr-rgb-shield-img-02.png) - -Name the variable **LoungeArea**, and for variable type, select the **Colored Light**. When done, click on **"Add Variable"**. - -![Adding a variable.](assets/alexa-mkr-rgb-shield-img-03.png) - -### Adding Your Network Details - -Now that we have created a variable, we can configure the **network details**. This is done by clicking on the **"Configure"** button in the **"Network"** section. - -![Entering the network details.](assets/alexa-mkr-rgb-shield-img-04.png) - ->**Note:** You can't enter any network details until you have added a variable. - -### Creating the Program - -With all configurations done, we can move onto creating the program. By clicking on the **"Sketch"** tab, we can start editing the code right away. - -![Click on the "Sketch" tab to edit the sketch.](assets/alexa-mkr-rgb-shield-img-05.png) - -First of all, we need to include two libraries called `ArduinoGraphics` and `Arduino_MKRRGB`. These will help us control the MKR RGB Shield. - -We will only be adding a couple of lines inside the `setup()`, and then the functionality of the program will all be stored inside the `onLoungeAreaChange()` function. The `loop()` will remain empty. - -When we later on will be connecting the cloud to Alexa, the data will be received directly from the Alexa app. Whenever the data updates, the `onLoungeAreaChange()` will execute, where it will fetch the data from Alexa (the RGB values) and display them on the RGB matrix. You can find the full code in the snippet below. - -```arduino -#include -#include -#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); - - MATRIX.begin(); - MATRIX.brightness(10); - - while(!Serial); - - // 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 -} - - -void onLoungeAreaChange() { - uint8_t r, g, b; - loungeArea.getValue().getRGB(r, g, b); - if (loungeArea.getSwitch()) { - Serial.println("R:"+String(r)+" G:"+String(g)+ " B:"+String(b)); //prints the current R, G, B values - MATRIX.beginDraw(); //starts a new "drawing" on the RGB shield's pixels - MATRIX.clear(); //clears the RGB shield's pixels - MATRIX.noStroke(); - MATRIX.fill(r, g, b); //the r, g, b values are fed into the shield's pixels - MATRIX.rect(0, 0, MATRIX.width(), MATRIX.height()); //creates a rectangle (this covers the entire matrix) - MATRIX.endDraw(); // ends the draw, and displays the new "drawing" - - } - else{ - Serial.println("Lamp Off"); - //the following code simply turns everything off - MATRIX.beginDraw(); - MATRIX.clear(); - MATRIX.noStroke(); - MATRIX.fill(0, 0, 0); - MATRIX.rect(0, 0, MATRIX.width(), MATRIX.height()); - MATRIX.endDraw(); - - } -} -``` - -### Uploading the Program - -Upload the code in the snippet above to your MKR WiFi 1010 board. When it has successfully uploaded, go to the **"Serial Monitor"** tab to initialize the program. If the connection is successful, we should see the following: - -![Information regarding connection to network & cloud.](assets/alexa-mkr-rgb-shield-img-05.1.png) - -We can now move on to the next step: **setting up Alexa.** - -### Over the Air Uploads - -Did you know that the Arduino IoT Cloud supports over the air uploads? When you've uploaded a sketch to your board once, it will become available for you to upload a new sketch to the board without connecting it to your computer! - -***Over the Air uploads require an Entry plan to the Arduino IoT Cloud*** - -To use this feature, make sure the board has power. If your board is already connected to the IoT Cloud, you will be able to upload to it over the air. Navigate to the Things sketch tab in the Arduino IoT Cloud interface, and you should see it being discovered just as if it was connected via USB. - - -## Step 2: Setting up Alexa - -We will now need the Amazon Alexa app which can be downloaded from the [Apple App Store](https://apps.apple.com/us/app/amazon-alexa/id944011620) or the [Google Play Store](https://play.google.com/store/apps/details?id=com.amazon.dee.app&hl=en). Once installed, login with your existing account or create a new one. - -### Installing the Arduino Alexa Skill - -Let's go through the steps necessary to install the Arduino Alexa Skill. - -![Installing the Alexa Skill.](assets/alexa_phone_1.png) - -1. Once in the Amazon Alexa app, begin by tapping on "Devices". -2. Tap on the "Enable Smart home skills" button. -3. We will now see a list of featured ones, where we need to search for the right skill. -4. If we search for "Arduino" we will see a skill that has that exact name. - -![Installing the Alexa skill part 2.](assets/alexa_phone_2.png) - -5. Once we have selected it, we'll need to enable it. -6. We now need to sync it with our Arduino Cloud, by logging into it. -7. Our Alexa and Arduino IoT Cloud is now synced! -8. We can now start discovering our devices! - -![Looking for devices.](assets/alexa_phone_3.png) - -### Amazon Alexa Devices Setup - -After waiting a little bit, we should see a new screen appear, where it says **"1 light found and connected"**. - -Click **"Set Up Device"**. If you like you can also add it to a group (this way you can control and organize your devices more easily), otherwise skip this part. - -![Light found and connected.](assets/alexa-mkr-rgb-shield-img-06.png) - -Congratulations! You should now be able to control the lights through your Alexa app. - -## Step 3: Controlling the Lights - -To control the lights on our setup, we will need to head over to the **"Devices"** tab in the Alexa app. Once in the Devices tab, click on the **"Lights"** button. We will now see the available lights. If you have other lights already connected, they will appear here as well. In our case, we only have one, which is **LoungeArea**, which is the same name as the variable we created earlier in the Arduino IoT Cloud. If we click on **LoungeArea** we will access the color / brightness control. - -![Controlling the lights through the Alexa app.](assets/alexa-mkr-rgb-shield-img-07.png) - -Any changes of color / brightness you make will be sent to our MKR WiFi 1010, which will change the pixels on the MKR RGB Shield accordingly. - -### Troubleshooting - -One great way of knowing if data is coming through from the Alexa app is by checking the Serial Monitor. The sketch that we uploaded to the board includes a command that prints out the value of **r, g** and **b** whenever they receive new data. If the board is successfully connecting to the cloud, it is most likely a problem on setting up the Alexa device. - -## Conclusion - -In this tutorial, we went through a few simple steps to integrate a MKR WiFi 1010 + MKR RGB Shield, the Arduino IoT Cloud and the Amazon Alexa app. - -![The Alexa and Arduino IoT Cloud integration.](assets/alexa-mkr-rgb-shield-img-08.png) - -As a result, we now have a smart light that can be controlled directly through the Alexa app, and if you have a physical Alexa device, you can start playing around with different voice commands, such as changing the color and brightness of your lamp! - -## More Tutorials - -You can find more tutorials in the [Arduino IoT Cloud documentation page](/arduino-cloud/). - diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/associate_device.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/associate_device.png deleted file mode 100644 index 705c592dbc..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/associate_device.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-circuit.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-circuit.png deleted file mode 100644 index 488ef224e2..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-circuit.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img01.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img01.png deleted file mode 100644 index aceb50a5c6..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img01.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img02.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img02.png deleted file mode 100644 index bd9c7ace91..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img02.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img03.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img03.png deleted file mode 100644 index 4f52703307..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img03.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img04.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img04.png deleted file mode 100644 index 7d47aff9fc..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img04.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img05.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img05.png deleted file mode 100644 index e49876b9b8..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img05.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img06.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img06.png deleted file mode 100644 index 0a45e78b53..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img06.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img07.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img07.png deleted file mode 100644 index 69a546cebe..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img07.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img08.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img08.png deleted file mode 100644 index ca6a45eb60..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img08.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img09.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img09.png deleted file mode 100644 index 2cb0f65d7c..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img09.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img10.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img10.png deleted file mode 100644 index c5f8c710bc..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img10.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img11.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img11.png deleted file mode 100644 index 0f815984c3..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/cloud-relay-control-img11.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/dashboard_edit_blank.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/dashboard_edit_blank.png deleted file mode 100644 index 15e2954017..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/dashboard_edit_blank.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_overview.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_overview.png deleted file mode 100644 index 4d0a44ed2a..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_overview.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_setup_1.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_setup_1.png deleted file mode 100644 index 5c72e0dc44..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_setup_1.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_setup_2.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_setup_2.png deleted file mode 100644 index dc1d17ba7e..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_setup_2.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_setup_3.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_setup_3.png deleted file mode 100644 index 32775546b9..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_setup_3.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_setup_4.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_setup_4.png deleted file mode 100644 index afcb09bd1e..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/device_setup_4.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/new_dashboard.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/new_dashboard.png deleted file mode 100644 index be696ec4ee..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/new_dashboard.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/new_device.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/new_device.png deleted file mode 100644 index 96e6c0fb3a..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/new_device.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/new_thing.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/new_thing.png deleted file mode 100644 index dde2c600df..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/new_thing.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/thing_overview.png b/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/thing_overview.png deleted file mode 100644 index 8bc9701882..0000000000 Binary files a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/thing_overview.png and /dev/null differ diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/cloud-relay-control.md b/content/arduino-cloud/03.tutorials/cloud-relay-control/cloud-relay-control.md deleted file mode 100644 index d54ba1b770..0000000000 --- a/content/arduino-cloud/03.tutorials/cloud-relay-control/cloud-relay-control.md +++ /dev/null @@ -1,251 +0,0 @@ ---- -title: 'Controlling relays from the Arduino IoT Cloud' -compatible-products: [mkr-wifi-1010, mkr-proto-relay-shield] -difficulty: beginner -description: 'Learn how to control the relays onboard the MKR Relay Shield through the Arduino IoT Cloud dashboard.' -tags: - - Relays -author: 'Karl Söderby' ---- - -## Introduction - -In this tutorial, we will go through how to control a MKR WiFi 1010 + a MKR Relay shield from the [Arduino IoT Cloud](https://create.arduino.cc/iot/things). We will create a simple configuration that allows us activate each of the relays on the shield through a dashboard in the cloud. - -## Goals - -The goals of this project are: - -- Set up the Arduino IoT Cloud. -- Create a program that controls the relays. -- Create a dashboard to remotely control the relays. -- Use the Arduino IoT Cloud Remote app to control relays. - -## Hardware & Software needed - -- [Arduino IoT Cloud](https://create.arduino.cc/iot/) -- [Arduino MKR WiFi 1010](https://store.arduino.cc/mkr-wifi-1010) -- [Arduino MKR Relay Shield](https://store.arduino.cc/arduino-mkr-relay-proto-shield) -- Arduino IoT Cloud Remote app (optional). - - [Play Store](https://play.google.com/store/apps/details?id=cc.arduino.cloudiot&hl=en&gl=US) - - [Apple Store](https://apps.apple.com/us/app/arduino-iot-cloud-remote/id1514358431) - -## Circuit - -![Mount the board on top of the shield.](assets/cloud-relay-control-circuit.png) - -## Step 1: Setting up the Arduino IoT Cloud - -To do so, we will first need to configure our MKR 1010 device in the Arduino IoT Cloud. Let's start by navigating to the Arduino IoT Cloud. - ->**Note:** You will need a Arduino account to use the Arduino IoT Cloud. If you do not have one, you will be directed to the account registration. - -### Configure a new device - -Once we are in the Arduino IoT Cloud, we will need to click on the **"Devices"** tab. This will open a new page which will ask you to add a new device. Click on the **"Add device"** button. - -![Adding a new device.](assets/new_device.png) - -You will now have an option of either configuring a new Arduino device, or a third party device. Select the **"Set up an Arduino device** option. - -![Selecting the type of device.](assets/device_setup_1.png) - -At this point, you will need to connect your cloud compatible board to your computer. You will also need to have installed the Arduino Create Agent. If if it is not installed, the set up wizard will ask you to install it. Your device should now show up, and you will need to click on the **"Configure"** -button. - -![Device found.](assets/device_setup_2.png) - -You will now be asked to name your device. In this case, a name was randomly generated, which is **Phil**. Click on **"Next"** to proceed. - -![Naming the device.](assets/device_setup_3.png) - -After clicking on next, the board will start to configure. This process may take a few minutes. - -![The configuration process.](assets/device_setup_4.png) - -Once it is done, we will be directed to the devices page, where we can see our device. Congratulations, you have just made your first device IoT ready! - -![Configuration complete!](assets/device_overview.png) - -### Creating a Thing and linking your device - -After our device is configured, we can move on to the next step: creating our very first Thing. Click on the **"Things"** tab. You should now see a button that says **"Create thing"**, which we will need to click. - -![Creating a thing.](assets/new_thing.png) - -We will now see an interface with multiple options. This is your Thing configuration overview. Here we can select what network we are connecting to, what device we are using and create variables that we want to sync. - -![Overview of a Thing.](assets/thing_overview.png) - -Let's start by linking our freshly configured device, by clicking on the **"Select Device"** button to the right. This will open up a window, where we can **"Associate"** the board with this Thing. - -![Associating the device.](assets/associate_device.png) - -### Creating variables - -Now, we can continue to create **variables** for our Thing. These variables will be synced with the cloud, as long as the board is connected to Internet and the cloud. - -For this application, we will create two **boolean** variables: one for each relay on the MKR Relay Shield. - -To create a new variable, click on the **"Add Variable"** button. - -![The "Add Variable" button.](assets/cloud-relay-control-img01.png) - -Let's name it **relay_1**, and select the **boolean** data type. Then click on **"Add Variable"**. - -![Adding the first variable.](assets/cloud-relay-control-img02.png) - -Let's add another variable, but let's name this one **relay_2**, which is also a boolean variable. - -![Adding the second variable.](assets/cloud-relay-control-img03.png) - -Great, now we have two **boolean variables** named **relay_1** and **relay_2**. - -### Adding your network details - -Now that we have created the variables, we can configure the **network details**. This is done by clicking on the **"Configure"** button in the **"Network"** section. - -![Entering network details.](assets/cloud-relay-control-img04.png) - ->**Note:** You can't enter any network details until you have added a variable. - - -### Over the Air Uploads - -Did you know that the Arduino IoT Cloud supports over the air uploads? When you've uploaded a sketch to your board once, it will become available for you to upload a new sketch to the board without connecting it to your computer! - -***Over the Air uploads require an Entry plan to the Arduino IoT Cloud*** - - -To use this feature, make sure the board has power. If your board is already connected to the IoT Cloud, you will be able to upload to it over the air. Navigate to the Things sketch tab in the Arduino IoT Cloud interface, and you should see it being discovered just as if it was connected via USB. - - -### Creating the program - -Once we are finished with all the configurations, we can move on to creating the sketch that we are going to upload to our MKR WiFi 1010. To do so, we first need to go to the **"Sketch"** tab. - -![Open the "Sketch" tab to edit the sketch.](assets/cloud-relay-control-img05.png) - -The sketch we are going to create is very simple. As most of the code is already generated through the configurations we made, we only need to make a few additions: configuring the relay pins as output, and creating two conditionals. - -You can find the full sketch below, which we need to upload to our board. - -```arduino -#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); - - pinMode(1, OUTPUT); - pinMode(2, OUTPUT); - - // 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 - -} - -void onRelay1Change() { - // Do something - if(relay_1){ - digitalWrite(1, LOW); - } - else{ - digitalWrite(1, HIGH); - } -} - -void onRelay2Change() { - // Do something - if(relay_2){ - digitalWrite(2, LOW); - } - else{ - digitalWrite(2, HIGH); - } -} -``` - -## Step 2: Creating a dashboard - -After our code has been successfully uploaded to our board, we we will need to create a dashboard to control our relays! - -Head over to the **"Dashboards"** tab, and click on **"Build Dashboard"**. - -![Click on "Build a dashboard".](assets/cloud-relay-control-img06.png) - -We can now see an empty dashboard. Let's click on the **"Add"** button, and select a **Switch** widget. - -![Adding a switch widget.](assets/cloud-relay-control-img07.png) - -Now, we need to link it with our **relay_1** variable, inside our Thing. - -![Linking a variable to the widget.](assets/cloud-relay-control-img08.png) - -We also need to rename the widget so we know which one is which. We choose **"RELAY_1"**. - -![Naming the widget.](assets/cloud-relay-control-img09.png) - -Now, repeat the same process, but instead link it to the **relay_2** variable. At the end, we should have two widgets, each linked to a relay. - -![The complete dashboard.](assets/cloud-relay-control-img10.png) - -Now you can simply test it out by turning ON or OFF the switches. You should hear the relays on your **MKR Relay Shield** making clicking noises. That means it is working! - -## Step 3: Connecting a component with higher voltage - ->**Note:** Working with higher voltage components should be done with extreme caution. Do not alter the circuit while it is connected to a higher power source, and do not connect any high voltage components directly to the Arduino. - -Up until now, we have simply activated the relays, but we still haven't connected anything to them. While we are not going to go in-depth on how to connect high power components, we can take a look at how we could connect something that operates on maximum 24V. - -Let's begin with the high power pins on the MKR Relay Shield. There are **six in total** for both relays, where there are three different type of connections: NO, COM and NC. - -![MKR Relay Shield's high power pins.](assets/MKRRELAY_T1_IMG06.png) - -In this scenario, we are going to use the **NC** configuration, which means that writing a **LOW** signal to the relay will connect the NC pin to COM, which provides power to the component connected. The circuit for this could look like this: - -![A circuit involving a 24V component.](assets/cloud-relay-control-img11.png) - -In this circuit, we are using a 24V power supply and a 24V heater. To control them, we need to use the following commands: - -To activate the relays: - -``` -digitalWrite(relay_1, LOW) -``` - -To de-activate the relays: - -``` -digitalWrite(relay_1, HIGH) -``` - ->**Note:** Use extreme caution when creating higher power circuits. Make sure that both the power supply and the component does not exceed 24V. For example, connecting it straight to a wall socket without a power converter would supply 220-240V, which is **10 times as high.** - -## Conclusion - -In this tutorial, we have gone through the necessary steps to connect a MKR WiFi 1010 + a MKR Relay Shield to the Arduino IoT Cloud. The relays can now be used to trigger higher voltage components, such as smaller heaters, fans or light bulbs. - -### More tutorials - -You can find more tutorials in the [Arduino IoT Cloud documentation page](/arduino-cloud/). \ No newline at end of file diff --git a/content/arduino-cloud/03.tutorials/tutorials.md b/content/arduino-cloud/03.tutorials/tutorials.md deleted file mode 100644 index ace2c8f7ae..0000000000 --- a/content/arduino-cloud/03.tutorials/tutorials.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Tutorials ---- \ No newline at end of file diff --git a/content/arduino-cloud/04.cloud-editor/cloud-editor.md b/content/arduino-cloud/04.cloud-editor/cloud-editor.md new file mode 100644 index 0000000000..db2125f6c1 --- /dev/null +++ b/content/arduino-cloud/04.cloud-editor/cloud-editor.md @@ -0,0 +1,3 @@ +--- +title: Cloud Editor +--- \ No newline at end of file diff --git a/content/arduino-cloud/03.tutorials/embedding-create-iframes/assets/iframe_highlight.png b/content/arduino-cloud/04.cloud-editor/embedding-create-iframes/assets/iframe_highlight.png similarity index 100% rename from content/arduino-cloud/03.tutorials/embedding-create-iframes/assets/iframe_highlight.png rename to content/arduino-cloud/04.cloud-editor/embedding-create-iframes/assets/iframe_highlight.png diff --git a/content/arduino-cloud/03.tutorials/embedding-create-iframes/embedding-create-iframes.md b/content/arduino-cloud/04.cloud-editor/embedding-create-iframes/embedding-create-iframes.md similarity index 100% rename from content/arduino-cloud/03.tutorials/embedding-create-iframes/embedding-create-iframes.md rename to content/arduino-cloud/04.cloud-editor/embedding-create-iframes/embedding-create-iframes.md diff --git a/content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_gif_1.gif b/content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_gif_1.gif similarity index 100% rename from content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_gif_1.gif rename to content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_gif_1.gif diff --git a/content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_1.jpg b/content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_1.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_1.jpg rename to content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_1.jpg diff --git a/content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_2.jpg b/content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_2.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_2.jpg rename to content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_2.jpg diff --git a/content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_3.jpg b/content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_3.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_3.jpg rename to content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_3.jpg diff --git a/content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_4.png b/content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_4.png similarity index 100% rename from content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_4.png rename to content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_4.png diff --git a/content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_5.png b/content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_5.png similarity index 100% rename from content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_5.png rename to content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_5.png diff --git a/content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_6.png b/content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_6.png similarity index 100% rename from content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_6.png rename to content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_6.png diff --git a/content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_7.png b/content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_7.png similarity index 100% rename from content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_7.png rename to content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_7.png diff --git a/content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_8.jpg b/content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_8.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_8.jpg rename to content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_8.jpg diff --git a/content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_9.jpg b/content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_9.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_9.jpg rename to content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/assets/import_sketch_and_library_img_9.jpg diff --git a/content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/import-your-sketchbook-and-libraries-to-the-web-editor.md b/content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/import-your-sketchbook-and-libraries-to-the-web-editor.md similarity index 100% rename from content/arduino-cloud/03.tutorials/import-your-sketchbook-and-libraries-to-the-web-editor/import-your-sketchbook-and-libraries-to-the-web-editor.md rename to content/arduino-cloud/04.cloud-editor/import-your-sketchbook-and-libraries-to-the-web-editor/import-your-sketchbook-and-libraries-to-the-web-editor.md diff --git a/content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_gif_1.gif b/content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_gif_1.gif similarity index 100% rename from content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_gif_1.gif rename to content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_gif_1.gif diff --git a/content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_gif_2.gif b/content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_gif_2.gif similarity index 100% rename from content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_gif_2.gif rename to content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_gif_2.gif diff --git a/content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_1.jpg b/content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_1.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_1.jpg rename to content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_1.jpg diff --git a/content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_2.jpg b/content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_2.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_2.jpg rename to content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_2.jpg diff --git a/content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_3.jpg b/content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_3.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_3.jpg rename to content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_3.jpg diff --git a/content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_4.jpg b/content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_4.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_4.jpg rename to content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_4.jpg diff --git a/content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_5.jpg b/content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_5.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_5.jpg rename to content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_5.jpg diff --git a/content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_6.jpg b/content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_6.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_6.jpg rename to content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_6.jpg diff --git a/content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_7.jpg b/content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_7.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_7.jpg rename to content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_7.jpg diff --git a/content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_8.jpg b/content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_8.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/share-your-sketches/assets/sharing_sketches_img_8.jpg rename to content/arduino-cloud/04.cloud-editor/share-your-sketches/assets/sharing_sketches_img_8.jpg diff --git a/content/arduino-cloud/03.tutorials/share-your-sketches/share-your-sketches.md b/content/arduino-cloud/04.cloud-editor/share-your-sketches/share-your-sketches.md similarity index 100% rename from content/arduino-cloud/03.tutorials/share-your-sketches/share-your-sketches.md rename to content/arduino-cloud/04.cloud-editor/share-your-sketches/share-your-sketches.md diff --git a/content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/secret_feature_1.png b/content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/secret_feature_1.png similarity index 100% rename from content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/secret_feature_1.png rename to content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/secret_feature_1.png diff --git a/content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/secret_feature_2.png b/content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/secret_feature_2.png similarity index 100% rename from content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/secret_feature_2.png rename to content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/secret_feature_2.png diff --git a/content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_1.jpg b/content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_1.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_1.jpg rename to content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_1.jpg diff --git a/content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_2.png b/content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_2.png similarity index 100% rename from content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_2.png rename to content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_2.png diff --git a/content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_3.jpg b/content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_3.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_3.jpg rename to content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_3.jpg diff --git a/content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_4.jpg b/content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_4.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_4.jpg rename to content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_4.jpg diff --git a/content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_5.png b/content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_5.png similarity index 100% rename from content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_5.png rename to content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_5.png diff --git a/content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_6.jpg b/content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_6.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_6.jpg rename to content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_6.jpg diff --git a/content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_7.png b/content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_7.png similarity index 100% rename from content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_7.png rename to content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_7.png diff --git a/content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_8.jpg b/content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_8.jpg similarity index 100% rename from content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_8.jpg rename to content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_8.jpg diff --git a/content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_9.png b/content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_9.png similarity index 100% rename from content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_9.png rename to content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/assets/share_secure_sketches_img_9.png diff --git a/content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/store-your-sensitive-data-safely-when-sharing.md b/content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/store-your-sensitive-data-safely-when-sharing.md similarity index 100% rename from content/arduino-cloud/03.tutorials/store-your-sensitive-data-safely-when-sharing/store-your-sensitive-data-safely-when-sharing.md rename to content/arduino-cloud/04.cloud-editor/store-your-sensitive-data-safely-when-sharing/store-your-sensitive-data-safely-when-sharing.md diff --git a/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/app-theme.png b/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/app-theme.png new file mode 100644 index 0000000000..6048635cf4 Binary files /dev/null and b/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/app-theme.png differ diff --git a/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/overview.png b/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/overview.png new file mode 100644 index 0000000000..e0386dbed1 Binary files /dev/null and b/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/overview.png differ diff --git a/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-activate-bkg-mode.png b/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-activate-bkg-mode.png new file mode 100644 index 0000000000..45db049382 Binary files /dev/null and b/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-activate-bkg-mode.png differ diff --git a/content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-cloud-variables.png b/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-cloud-variables.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-cloud-variables.png rename to content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-cloud-variables.png diff --git a/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-dashboard.png b/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-dashboard.png new file mode 100644 index 0000000000..0d73d8c449 Binary files /dev/null and b/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-dashboard.png differ diff --git a/content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-overview.png b/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-overview.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.iot-remote-app/assets/remote-app-overview.png rename to content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-overview.png diff --git a/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-setup.png b/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-setup.png new file mode 100644 index 0000000000..2283cc4c3c Binary files /dev/null and b/content/arduino-cloud/05.iot-remote-app/01.getting-started/assets/remote-app-setup.png differ diff --git a/content/arduino-cloud/01.getting-started/09.iot-remote-app/hero-banner.png b/content/arduino-cloud/05.iot-remote-app/01.getting-started/hero-banner.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.iot-remote-app/hero-banner.png rename to content/arduino-cloud/05.iot-remote-app/01.getting-started/hero-banner.png diff --git a/content/arduino-cloud/01.getting-started/09.iot-remote-app/iot-remote-app.md b/content/arduino-cloud/05.iot-remote-app/01.getting-started/iot-remote-app.md similarity index 59% rename from content/arduino-cloud/01.getting-started/09.iot-remote-app/iot-remote-app.md rename to content/arduino-cloud/05.iot-remote-app/01.getting-started/iot-remote-app.md index dd103b8838..4888a5d63d 100644 --- a/content/arduino-cloud/01.getting-started/09.iot-remote-app/iot-remote-app.md +++ b/content/arduino-cloud/05.iot-remote-app/01.getting-started/iot-remote-app.md @@ -1,27 +1,27 @@ --- -title: Arduino IoT Cloud Remote App -description: Learn how to set up the IoT Cloud Remote app to control & monitor your dashboards and access your phone's sensor data. +title: IoT Remote App +description: Learn how to set up the IoT Remote app to control & monitor your dashboards and access your phone's sensor data. author: Karl Söderby -tags: [IoT Cloud, Remote App, Phone Data] +tags: [Arduino Cloud, Remote App, Phone Data] --- -The **Arduino IoT Cloud Remote** phone application lets you control and monitor all of your dashboards in the [Arduino IoT Cloud](https://create.arduino.cc/iot/). With the app, you can also access your phone's internal sensors such as GPS data, light sensor, IMU and more (depending on what phone you have). +The **Arduino IoT Remote** phone application lets you control and monitor all of your dashboards in the [Arduino Cloud](app.arduino.cc). With the app, you can also access your phone's internal sensors such as GPS data, light sensor, IMU and more (depending on what phone you have). The phone's sensor data is automatically stored in cloud variables, which you can also synchronize with other Things. This means your phone can become a part of your IoT system, acting as another node in your network. -***The Arduino IoT Cloud Remote app now supports data collection in background mode. This can be enabled inside the app. Please note that your microphone is NEVER used in background mode, only when the app is being used directly. See more in the [Background Mode](#background-mode) section*** +***The Arduino IoT Remote app now supports data collection in background mode. This can be enabled inside the app. Please note that your microphone is NEVER used in background mode, only when the app is being used directly. See more in the [Background Mode](#background-mode) section*** ## Hardware & Software Needed - Android / iOS smart phone. - Arduino account (sign up [here](https://login.arduino.cc/login)). -- Arduino IoT Cloud Remote App: +- Arduino IoT Remote App: - [App Store](https://apps.apple.com/us/app/arduino-iot-cloud-remote/id1514358431). - [Google Play](https://play.google.com/store/apps/details?id=cc.arduino.cloudiot). ## Install App -To use the Arduino IoT Cloud Remote app, visit Google Play / App Store and search for **"Arduino IoT Cloud Remote"**. Links are available just above. +To use the Arduino IoT Remote app, visit Google Play / App Store and search for **"Arduino IoT Remote"**. Links are available just above. ***NOTE: The IoT Remote app requires iOS 12.4 or later for iOS the version. If you are using Android, version 8.0 or later is required. Make sure the iOS or Android version on your device is up to date before downloading the app.*** @@ -29,7 +29,14 @@ After installing the app, you will need to log in to your Arduino account. If yo After you login, you will discover all of your dashboards (if you have any), in the main menu. -![Dashboards in the Arduino IoT Remote app.](assets/remote-app-overview.png) +![Dashboards in the Arduino IoT Remote app.](assets/overview.png) + +## Themes + +You can change between the default (light) to the dark theme, by navigating to **Settings > App theme**. + +![Change theme (light/dark)](assets/app-theme.png) + ## Access Phone Sensor Data @@ -46,9 +53,11 @@ Upon completion, head over to the new dashboard, that should contain your name + ![Phone sensor data in the dashboard.](assets/remote-app-dashboard.png) -***When setting up your phone as a device, a Thing with a similar name is created in the Arduino IoT Cloud. It can not be programmed as a regular device.*** +For a more in depth guide on how to set this up, and how to use it to control your other devices, head over to the full [Phone Sensor Data Guide](/arduino-cloud/iot-remote-app/iot-remote-phone-sensors). -## Background Mode +***When setting up your phone as a device, a Thing with a similar name is created in the Arduino Cloud. It can not be programmed as a regular device.*** + +### Background Mode Now that you've got access to your phone's data, you can also enable the **background mode**. This will allow your phone to continue streaming data to the cloud, even though the app is not being used. @@ -62,16 +71,10 @@ Here you can also choose the update frequency, (either on change, or every `x` s ## Phone & Board Sync -The sensor data from your phone is tracked through **variables** in the Arduino IoT Cloud, and can therefore be synchronized with other variables. +The sensor data from your phone is tracked through **variables** in the Arduino Cloud, and can therefore be synchronized with other variables. -Head over to the [Arduino IoT Cloud - Things](https://create.arduino.cc/iot/things) and go to the Thing created for your phone (in this case, it is named `Karl_s S20_ Thing`), and select a variable you want to synchronize. In the following menu you can link it to other variables on other Things. +Head over to the [Arduino Cloud - Things](app.arduino.cc/things) and go to the Thing created for your phone (in this case, it is named `Karl_s S20_ Thing`), and select a variable you want to synchronize. In the following menu you can link it to other variables on other Things. ![Synchronizing variables.](assets/remote-app-cloud-variables.png) -Simply described, this allows you to use your phone as an input for a number of different applications. For example, the `Compass` variable can be used to control the angle of a servo motor on another device. You can read more about how to synchronize these variables in the [Use Sensor Data From Your Phone](/arduino-cloud/tutorials/iot-remote-phone-sensors) tutorial, that includes a practical example. - -## Summary - -The IoT Remote App is great for you to manage all of your devices via your smart phone. Check in on your plants, water them remotely, or manage your smart light system in your house, all from one app. - -With the phone in background mode, you also enable your smart phone to become one of the devices in your network. \ No newline at end of file +Simply described, this allows you to use your phone as an input for a number of different applications. For example, the `Compass` variable can be used to control the angle of a servo motor on another device. You can read more about how to synchronize these variables in the [Use Sensor Data From Your Phone](/arduino-cloud/iot-remote-app/iot-remote-phone-sensors) tutorial, that includes a practical example. \ No newline at end of file diff --git a/content/arduino-cloud/03.tutorials/iot-remote-phone-sensors/assets/dashboard.png b/content/arduino-cloud/05.iot-remote-app/02.iot-remote-phone-sensors/assets/dashboard.png similarity index 100% rename from content/arduino-cloud/03.tutorials/iot-remote-phone-sensors/assets/dashboard.png rename to content/arduino-cloud/05.iot-remote-app/02.iot-remote-phone-sensors/assets/dashboard.png diff --git a/content/arduino-cloud/03.tutorials/iot-remote-phone-sensors/assets/dashboards.png b/content/arduino-cloud/05.iot-remote-app/02.iot-remote-phone-sensors/assets/dashboards.png similarity index 100% rename from content/arduino-cloud/03.tutorials/iot-remote-phone-sensors/assets/dashboards.png rename to content/arduino-cloud/05.iot-remote-app/02.iot-remote-phone-sensors/assets/dashboards.png diff --git a/content/arduino-cloud/03.tutorials/iot-remote-phone-sensors/assets/expected-outcome.gif b/content/arduino-cloud/05.iot-remote-app/02.iot-remote-phone-sensors/assets/expected-outcome.gif similarity index 100% rename from content/arduino-cloud/03.tutorials/iot-remote-phone-sensors/assets/expected-outcome.gif rename to content/arduino-cloud/05.iot-remote-app/02.iot-remote-phone-sensors/assets/expected-outcome.gif diff --git a/content/arduino-cloud/03.tutorials/iot-remote-phone-sensors/assets/variablesync.png b/content/arduino-cloud/05.iot-remote-app/02.iot-remote-phone-sensors/assets/variablesync.png similarity index 100% rename from content/arduino-cloud/03.tutorials/iot-remote-phone-sensors/assets/variablesync.png rename to content/arduino-cloud/05.iot-remote-app/02.iot-remote-phone-sensors/assets/variablesync.png diff --git a/content/arduino-cloud/03.tutorials/iot-remote-phone-sensors/iot-remote-phone-sensors.md b/content/arduino-cloud/05.iot-remote-app/02.iot-remote-phone-sensors/iot-remote-phone-sensors.md similarity index 69% rename from content/arduino-cloud/03.tutorials/iot-remote-phone-sensors/iot-remote-phone-sensors.md rename to content/arduino-cloud/05.iot-remote-app/02.iot-remote-phone-sensors/iot-remote-phone-sensors.md index 31b0185942..f5d406575a 100644 --- a/content/arduino-cloud/03.tutorials/iot-remote-phone-sensors/iot-remote-phone-sensors.md +++ b/content/arduino-cloud/05.iot-remote-app/02.iot-remote-phone-sensors/iot-remote-phone-sensors.md @@ -1,8 +1,8 @@ --- title: 'Use Sensor Data From Your Phone' -description: 'Stream sensor data from your phone live to the Arduino IoT Cloud' +description: 'Stream sensor data from your phone live to the Arduino Cloud' tags: -- Arduino IoT Cloud +- Arduino Cloud - Remote app - Mobile sensors - Android @@ -10,15 +10,15 @@ tags: author: 'Jacob Hylén' --- -The Arduino IoT Cloud is a powerful platform that can help you with setting up your own IoT devices within minutes. +The Arduino Cloud is a powerful platform that can help you with setting up your own IoT devices within minutes. -It is now possible to synchronize your phone's sensor data with the cloud, using the Arduino Remote App for [iOS](https://apps.apple.com/us/app/arduino-iot-cloud-remote/id1514358431) and [Android](https://play.google.com/store/apps/details?id=cc.arduino.cloudiot&hl=en&gl=US). Furthermore, this data can also be used to control your Arduino boards, such as mapping a value from a sensor on your phone to an actuator on your Arduino. +It is now possible to synchronize your phone's sensor data with the cloud, using the Arduino IoT Remote App for [iOS](https://apps.apple.com/us/app/arduino-iot-cloud-remote/id1514358431) and [Android](https://play.google.com/store/apps/details?id=cc.arduino.cloudiot&hl=en&gl=US). Furthermore, this data can also be used to control your Arduino boards, such as mapping a value from a sensor on your phone to an actuator on your Arduino. Your smartphone is absolutely **packed** with sophisticated sensors that constantly measure everything from GPS position, to magnetic fields, acceleration, and so on. But they're difficult for a maker to take advantage of without having extensive knowledge of mobile development. -That is changed by the Arduino IoT Remote app - as you are able to, with the latest version of the app for [Android](https://play.google.com/store/apps/details?id=cc.arduino.cloudiot&hl=en&gl=US) and [iOS](https://apps.apple.com/us/app/arduino-iot-cloud-remote/id1514358431), set up a dashboard in the Arduino IoT Cloud that tracks and displays all your sensor data in a neat dashboard within a minute. +That is changed by the Arduino IoT Remote app - as you are able to, with the latest version of the app for [Android](https://play.google.com/store/apps/details?id=cc.arduino.cloudiot&hl=en&gl=US) and [iOS](https://apps.apple.com/us/app/arduino-iot-cloud-remote/id1514358431), set up a dashboard in the Arduino Cloud that tracks and displays all your sensor data in a neat dashboard within a minute. -The goal with this project is to learn about how you can use your smartphone as a remote, sending sensor data to the Arduino IoT Cloud. You'll also learn how this sensor data can be used by other Things in your Arduino Cloud account, essentially letting you control your IoT devices depending on your variables such as GPS position, compass orientation, or any of the other in the long list of variables the IoT Remote app can stream live to the cloud. +The goal with this project is to learn about how you can use your smartphone as a remote, sending sensor data to the Arduino Cloud. You'll also learn how this sensor data can be used by other Things in your Arduino Cloud account, essentially letting you control your IoT devices depending on your variables such as GPS position, compass orientation, or any of the other in the long list of variables the IoT Remote app can stream live to the cloud. You will learn this by making a small project where a servo motor reacts to where you point your phone, as shown below. @@ -29,11 +29,11 @@ To Follow along with this article, you will need the following: - An Android or iOS Smartphone/tablet - An [Arduino Cloud](https://cloud.arduino.cc/home/) Account -- An Arduino IoT Cloud-compatible board (optional). +- An Arduino Cloud-compatible board (optional). - A Servo motor (optional). ## Phone Setup -To start this process, you will need to download the Arduino IoT Cloud Remote app from either the [Google Play Store](https://play.google.com/store/apps/details?id=cc.arduino.cloudiot&hl=en&gl=US) or the[ Apple App store](https://apps.apple.com/us/app/arduino-iot-cloud-remote/id1514358431) depending on your device, if you don't already have it installed. If you do have it installed already you may need to update it, so take a quick look to make sure that you have the latest version downloaded. +To start this process, you will need to download the Arduino IoT Remote app from either the [Google Play Store](https://play.google.com/store/apps/details?id=cc.arduino.cloudiot&hl=en&gl=US) or the[ Apple App store](https://apps.apple.com/us/app/arduino-iot-cloud-remote/id1514358431) depending on your device, if you don't already have it installed. If you do have it installed already you may need to update it, so take a quick look to make sure that you have the latest version downloaded. Once you have the app installed, open it and log into your [Arduino Cloud](https://cloud.arduino.cc/home/) account. At this point you should be presented with a list of all your previous dashboards if you have any. @@ -41,7 +41,7 @@ Once you have the app installed, open it and log into your [Arduino Cloud](https Tap the hamburger-menu in the top left of your screen, if you're using version 1.1 of the app or later you should have two options, press "**Use data from your phone**". -At this point, if you expand the section, you can see all the sensors that can be tracked in the Arduino IoT Cloud listed. You'll need to consent to the sensor data being sent to the Arduino IoT Cloud by checking the box, then you're ready to start the automated process of building the dashboard. Tap "**SET YOUR PHONE**" and sit back, relax, while the app takes care of everything else for you. +At this point, if you expand the section, you can see all the sensors that can be tracked in the Arduino Cloud listed. You'll need to consent to the sensor data being sent to the Arduino Cloud by checking the box, then you're ready to start the automated process of building the dashboard. Tap "**SET YOUR PHONE**" and sit back, relax, while the app takes care of everything else for you. Once done, check out all the sensor data in the dashboard. How neat is that? @@ -50,13 +50,13 @@ Once done, check out all the sensor data in the dashboard. How neat is that? Try manipulating your phone in different ways to see how the data reacts, move it around, bring magnets close, make sounds, try anything you can think of! ## Use the Data -Now that you've got your sensor data in the Arduino IoT Cloud, the next step is to use it for a project. As an example, let's sync the compass orientation of your phone to a variable controlling the angle of a servo motor. +Now that you've got your sensor data in the Arduino Cloud, the next step is to use it for a project. As an example, let's sync the compass orientation of your phone to a variable controlling the angle of a servo motor. The mobile "**Thing**" can't be programmed, but you can sync the variables from it with variables in other "**Things**" -So go to the [Arduino IoT Cloud](https://create.arduino.cc/iot/things) on your computer, and create a new **Thing**. +So go to the [Arduino Cloud](app.arduino.cc/things) on your computer, and create a new **Thing**. -Grab your **Arduino IoT Cloud** compatible Arduino board and connect it to your computer, and configure it with your thing. I am using an **Arduino Nano 33 IoT**, and I am going with the suggested name for my device, which happens to be "**Robby**" +Grab your **Arduino Cloud** compatible Arduino board and connect it to your computer, and configure it with your thing. I am using an **Arduino Nano 33 IoT**, and I am going with the suggested name for my device, which happens to be "**Robby**" You will also need to enter your network credentials at this stage. @@ -102,7 +102,7 @@ Add the following code in the loop function: The full code can be found here: ``` /* - Arduino IoT Cloud Variables description + Arduino Cloud Variables description The following variables are automatically generated and updated when changes are made to the Thing @@ -132,12 +132,12 @@ void setup() { // Defined in thingProperties.h initProperties(); - // Connect to Arduino IoT Cloud + // Connect to Arduino 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 + related to the state of network and Arduino Cloud connection and errors the higher number the more granular information you’ll get. The default is 0 (only errors). Maximum is 4 @@ -157,7 +157,7 @@ void loop() { /* Since Compass is READ_WRITE variable, onCompassChange() is - executed every time a new value is received from IoT Cloud. + executed every time a new value is received from Arduino Cloud. */ void onCompassChange() { // Add your code here to act upon Compass change @@ -168,6 +168,6 @@ void onCompassChange() { Once the sketch is uploaded to your board, wait for it to connect to your network, then open the IoT Remote app on your phone and watch as the Servo reacts when you rotate your phone. ## Conclusion -With this tutorial, you have learned how to connect your android or iOS smartphone to the Arduino IoT Cloud and send all sorts of sensor data from your device, and how to integrate this sensor data with your other Arduino IoT Cloud Things. +With this tutorial, you have learned how to connect your android or iOS smartphone to the Arduino Cloud and send all sorts of sensor data from your device, and how to integrate this sensor data with your other Arduino Cloud Things. The small project done in this tutorial is just the tip of the iceberg, you could take what you learned here and apply it in other ways to create an endless amount of cool interactive IoT projects that take advantage of the sophisticated sensors you carry in your pocket every day. \ No newline at end of file diff --git a/content/arduino-cloud/05.iot-remote-app/iot-remote-app.md b/content/arduino-cloud/05.iot-remote-app/iot-remote-app.md new file mode 100644 index 0000000000..fc119d70a7 --- /dev/null +++ b/content/arduino-cloud/05.iot-remote-app/iot-remote-app.md @@ -0,0 +1,3 @@ +--- +title: IoT Remote App +--- \ No newline at end of file diff --git a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-01.png b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-01.png similarity index 100% rename from content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-01.png rename to content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-01.png diff --git a/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-02.png b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-02.png new file mode 100644 index 0000000000..defdb6c201 Binary files /dev/null and b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-02.png differ diff --git a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-03.png b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-03.png similarity index 100% rename from content/arduino-cloud/02.features/02.cloud-scheduler/assets/cloud-scheduler-img-03.png rename to content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-03.png diff --git a/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-04.png b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-04.png new file mode 100644 index 0000000000..70dc120b11 Binary files /dev/null and b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-04.png differ diff --git a/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-05.png b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-05.png new file mode 100644 index 0000000000..1ff3c7041c Binary files /dev/null and b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-05.png differ diff --git a/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-06.png b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-06.png new file mode 100644 index 0000000000..7e78b7b2d3 Binary files /dev/null and b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-06.png differ diff --git a/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-timezone.png b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-timezone.png new file mode 100644 index 0000000000..44d220c807 Binary files /dev/null and b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/cloud-scheduler-img-timezone.png differ diff --git a/content/arduino-cloud/02.features/02.cloud-scheduler/assets/scheduler-action.gif b/content/arduino-cloud/06.features/02.cloud-scheduler/assets/scheduler-action.gif similarity index 100% rename from content/arduino-cloud/02.features/02.cloud-scheduler/assets/scheduler-action.gif rename to content/arduino-cloud/06.features/02.cloud-scheduler/assets/scheduler-action.gif diff --git a/content/arduino-cloud/02.features/02.cloud-scheduler/cloud-scheduler.md b/content/arduino-cloud/06.features/02.cloud-scheduler/cloud-scheduler.md similarity index 87% rename from content/arduino-cloud/02.features/02.cloud-scheduler/cloud-scheduler.md rename to content/arduino-cloud/06.features/02.cloud-scheduler/cloud-scheduler.md index 81f1bbd96b..e124060cfb 100644 --- a/content/arduino-cloud/02.features/02.cloud-scheduler/cloud-scheduler.md +++ b/content/arduino-cloud/06.features/02.cloud-scheduler/cloud-scheduler.md @@ -1,13 +1,13 @@ --- -title: 'Arduino IoT Cloud Scheduler Feature' +title: 'Scheduler' description: 'Learn how to use the scheduler feature to trigger repeating jobs during specific times.' -tags: [IoT Cloud, Scheduler, Time] +tags: [Arduino Cloud, Scheduler, Time] author: 'Karl Söderby' software: - iot-cloud --- -It is now possible to schedule jobs with the [Arduino IoT Cloud](https://create.arduino.cc/iot/), using the new `CloudSchedule` variable type. You can pick a start & end date for when the variable should be triggered, and for how long it should be active. This variable can be controlled in real time using a graphical widget that you can place on an IoT Cloud dashboard. +It is now possible to schedule jobs with the [Arduino Cloud](app.arduino.cc), using the new `CloudSchedule` variable type. You can pick a start & end date for when the variable should be triggered, and for how long it should be active. This variable can be controlled in real time using a graphical widget that you can place on an Arduino Cloud dashboard. We can for example have: @@ -21,7 +21,7 @@ The goals of this project are: - Learn how the `CloudSchedule` variable works. - Learn how to access local time in your sketch. -Make sure you have a [cloud-compatible board](/cloud/iot-cloud/tutorials/technical-reference#compatible-hardware). +Make sure you have a [cloud-compatible board](/arduino-cloud/hardware/devices#type-of-devices). ## How Does it Work? @@ -151,9 +151,9 @@ time_variable = ArduinoCloud.getLocalTime(); ### Create a Thing -***If you are new to the Arduino IoT Cloud, you can either visit the [Getting Started with Arduino IoT Cloud](https://docs.arduino.cc/cloud/iot-cloud/tutorials/iot-cloud-getting-started) guide, or any of the tutorials in the [Arduino IoT Cloud documentation](https://docs.arduino.cc/cloud/iot-cloud). There you will find detailed step by step guides.*** +***If you are new to the Arduino Cloud, you can either visit the [Getting Started with Arduino Cloud](/arduino-cloud/guides/overview) guide, or any of the tutorials in the [Arduino Cloud documentation](/arduino-cloud/). There you will find detailed step by step guides.*** -**1.** Navigate to [Arduino IoT Cloud](https://create.arduino.cc/iot/). You will need to log in with your Arduino account. +**1.** Navigate to [Arduino Cloud](app.arduino.cc). You will need to log in with your Arduino account. **2.** Create a new Thing by clicking on the "Create Thing" button. You can name it something like "Scheduler Test". @@ -186,7 +186,7 @@ In order for our job to go off at the right time, we need to set the **time zone ### Network Credentials -To connect your device to the Arduino IoT Cloud, you need to enter your network credentials in the "network" section. +To connect your device to the Arduino Cloud, you need to enter your network credentials in the "network" section. ***Note that this only applies to Wi-Fi enabled boards.*** @@ -308,4 +308,4 @@ If you have any issues with finishing this tutorial, you can check out some comm ## Conclusion -The scheduler is yet another amazing Arduino IoT Cloud feature that allows you to control the future. In this tutorial, we used **just one scheduler**, but you might just as easily create 10 schedulers that can perform actions automatically. This makes it an ideal building block for IoT projects. +The scheduler is yet another amazing Arduino Cloud feature that allows you to control the future. In this tutorial, we used **just one scheduler**, but you might just as easily create 10 schedulers that can perform actions automatically. This makes it an ideal building block for IoT projects. diff --git a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-01.png b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-01.png similarity index 100% rename from content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-01.png rename to content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-01.png diff --git a/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-02-1.png b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-02-1.png new file mode 100644 index 0000000000..8cce1f078c Binary files /dev/null and b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-02-1.png differ diff --git a/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-02.png b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-02.png new file mode 100644 index 0000000000..cc64bcf68e Binary files /dev/null and b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-02.png differ diff --git a/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-03.png b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-03.png new file mode 100644 index 0000000000..03ba4c6930 Binary files /dev/null and b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-03.png differ diff --git a/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-04.png b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-04.png new file mode 100644 index 0000000000..cf8a3c20fb Binary files /dev/null and b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-04.png differ diff --git a/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-05.png b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-05.png new file mode 100644 index 0000000000..717b8a9a2d Binary files /dev/null and b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-05.png differ diff --git a/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-06.png b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-06.png new file mode 100644 index 0000000000..4031673ae3 Binary files /dev/null and b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-06.png differ diff --git a/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-07.png b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-07.png new file mode 100644 index 0000000000..08c865fcdd Binary files /dev/null and b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-07.png differ diff --git a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-09.png b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-09.png similarity index 100% rename from content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-09.png rename to content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-09.png diff --git a/content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-10.png b/content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-10.png similarity index 100% rename from content/arduino-cloud/02.features/03.device-to-device/assets/device-to-device-img-10.png rename to content/arduino-cloud/06.features/03.device-to-device/assets/device-to-device-img-10.png diff --git a/content/arduino-cloud/02.features/03.device-to-device/device-to-device.md b/content/arduino-cloud/06.features/03.device-to-device/device-to-device.md similarity index 80% rename from content/arduino-cloud/02.features/03.device-to-device/device-to-device.md rename to content/arduino-cloud/06.features/03.device-to-device/device-to-device.md index 2588ff8901..dfa41571e3 100644 --- a/content/arduino-cloud/02.features/03.device-to-device/device-to-device.md +++ b/content/arduino-cloud/06.features/03.device-to-device/device-to-device.md @@ -1,8 +1,6 @@ --- -title: 'Device to device with Arduino IoT Cloud' -compatible-products: [mkr-1000-wifi, mkr-wifi-1010, nano-33-iot, nano-rp2040-connect] -difficulty: intermediate -description: 'Learn how to connect two boards through the Arduino IoT Cloud, by syncing their variables.' +title: 'Device to Device' +description: 'Learn how to connect two boards through the Arduino Cloud, by syncing their variables.' tags: - Device to device author: 'Karl Söderby' @@ -10,7 +8,7 @@ author: 'Karl Söderby' ## Introduction -In this tutorial, we will find out how to send data between two Arduino boards, using the Arduino IoT Cloud. Each board will have **one LED and one button each** that will be used to send data between the boards. +In this tutorial, we will find out how to send data between two Arduino boards, using the Arduino Cloud. Each board will have **one LED and one button each** that will be used to send data between the boards. This will be made possible through something called **syncing variables**, which will be explained further in this tutorial. @@ -18,20 +16,20 @@ This will be made possible through something called **syncing variables**, which The goals of this project are: -- Set up the Arduino IoT Cloud. +- Set up the Arduino Cloud. - Create synchronized variables. - Control an LED remotely with a push button. ## Hardware & Software needed -- [Arduino IoT Cloud](https://create.arduino.cc/iot/). +- [Arduino Cloud](app.arduino.cc). - 2x [Arduino MKR WiFi 1010](https://store.arduino.cc/mkr-wifi-1010) or, - 2x [Arduino MKR WiFi 1000](https://store.arduino.cc/arduino-mkr1000-wifi) or, - 2x [Arduino Nano 33 IoT](https://store.arduino.cc/arduino-nano-33-iot) or, - 2x [Arduino Nano RP2040 Connect](https://store.arduino.cc/nano-rp2040-connect-with-headers). - Micro USB cable. -***Note: It is not required to have two devices of the same type. You can for example use a Nano RP2040 Connect and a MKR WiFi 1010. Any [IoT Cloud enabled Wi-Fi board](/cloud/iot-cloud/tutorials/iot-cloud-getting-started#compatible-hardware) will work with this tutorial.*** +***Note: It is not required to have two devices of the same type. You can for example use a Nano RP2040 Connect and a MKR WiFi 1010. Any [Arduino Cloud enabled Wi-Fi board](/arduino-cloud/hardware/devices#type-of-devices) will work with this tutorial.*** We will also need the following components for the circuit: @@ -49,15 +47,15 @@ Follow the circuit below to connect the buttons and LEDs to your Arduino board. ![Two identical circuits with 1x button and 1x LED each.](assets/device-to-device-img-01.png) -## Setting up the Arduino IoT Cloud +## Setting up the Arduino Cloud -To start, we will need to head over to the [Arduino IoT Cloud](https://create.arduino.cc/iot/). This is also accessible through the menu at the top right. +To start, we will need to head over to the [Arduino Cloud](app.arduino.cc). This is also accessible through the menu at the top right. -![Navigate to the cloud.](assets/device-to-device-img-02.png) +![1Navigate to the cloud.](assets/device-to-device-img-02.png) ### Step 1: Configuring two devices -In this tutorial, we will need to set up **two devices in the Arduino IoT Cloud**. If you have never used this service before, you can check out [our getting started with the IoT cloud guide](https://www.arduino.cc/en/Tutorial/iot-cloud-getting-started). +In this tutorial, we will need to set up **two devices in the Arduino Cloud**. If you have never used this service before, you can check out [our getting started with the IoT cloud guide](https://www.arduino.cc/en/Tutorial/iot-cloud-getting-started). Now that we are working with two devices, it is important to separate them from each other, since they will later be linked to two different Things. In this tutorial, we named the devices: @@ -70,26 +68,26 @@ It is a good idea to place a label on the physical board to remember which one i Let's start by creating a new Thing, for simplicity, let's name it **Remote Light One**. -![The Thing overview.](assets/device-to-device-img-02-1.png) +![1The Thing overview.](assets/device-to-device-img-02-1.png) Now, we will need to add two variables, with the following settings: | Variable Name | Data Type | Permission | | ------------- | --------- | ------------ | -| switch_1 | integer | read & write | +| switch_1 | boolean | read & write | | switch_2 | boolean | read & write | We also need to enter our network details, and select our device (which should be **Device_1**). The final overview should look something like this: -![The final view.](assets/device-to-device-img-03.png) +![1The final view.](assets/device-to-device-img-03.png) ### Step 3: Program the first Thing -Now, we also need to complete the sketch for our first Thing. First, let's head over to the **"Sketch"** tab in the Arduino IoT Cloud. +Now, we also need to complete the sketch for our first Thing. First, let's head over to the **"Sketch"** tab in the Arduino Cloud. -![Click on the "Sketch" tab to edit the sketch.](assets/device-to-device-img-04.png) +![2Click on the "Sketch" tab to edit the sketch.](assets/device-to-device-img-04.png) The code that is needed can be found in the snippet below. Upload the sketch to the first board. @@ -114,12 +112,12 @@ void setup() { // Defined in thingProperties.h initProperties(); - // Connect to Arduino IoT Cloud + // Connect to Arduino 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 + related to the state of network and Arduino Cloud connection and errors the higher number the more granular information you’ll get. The default is 0 (only errors). Maximum is 4 @@ -163,19 +161,15 @@ After we have successfully uploaded the code to our first board, we can go on to To create our second Thing, we need to click on the **"Things"** tab, and click on **"Create Thing"**. We can name this one **Remote Light Two**. -![Creating the second thing.](assets/device-to-device-img-05.png) +![1Creating the second thing.](assets/device-to-device-img-05.png) Now, we need to create the variables we want to sync with the other Thing. First, click on the **"Add Variable"** button. We will name this one **switch_1** as well, and then click on the **"Sync with other things"** option. -![Click on "Sync with other things".](assets/device-to-device-img-06.png) +![1Click on "Sync with other things".](assets/device-to-device-img-06.png) -We will now see the two variables we created inside **Remote Light One**. Let's select the **switch_1** variable and click on **"Synchronize variables"**. +We will now see the two variables we created inside **Remote Light One**. Let's select the **switch_1** variable and click on **"Synchronize variables"** and finally click on **Add Variable**. -![Selecting the variables we want to synchronize.](assets/device-to-device-img-07.png) - -Then, click on the **"Add Variable"** button. - -![Adding the variable.](assets/device-to-device-img-08.png) +![1Selecting the variables we want to synchronize.](assets/device-to-device-img-07.png) Next, we can repeat the same process for the boolean variable, but instead of selecting the **switch_2** variable to sync with, select the **boolean_sync** variable. Now we should have two variables that are synced with our other Thing. @@ -212,12 +206,12 @@ void setup() { // Defined in thingProperties.h initProperties(); - // Connect to Arduino IoT Cloud + // Connect to Arduino 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 + related to the state of network and Arduino Cloud connection and errors the higher number the more granular information you’ll get. The default is 0 (only errors). Maximum is 4 @@ -288,13 +282,13 @@ The logic behind it is that one button is each linked to one of the booleans. If ## Conclusion -In this tutorial, we created a connection between two Arduino boards, using the Arduino IoT Cloud. We set up two identical circuits, and uploaded two almost identical sketches to the boards. +In this tutorial, we created a connection between two Arduino boards, using the Arduino Cloud. We set up two identical circuits, and uploaded two almost identical sketches to the boards. The connection between the boards is made through the **syncing of variables**, which allows two Things to communicate with each other. In this case, whenever a boolean is activated on one device, it is also activated on the other device. This **remote ON/OFF switch** is a great building block for creating other cool IoT projects. ### More tutorials -You can find more tutorials in the [Arduino IoT Cloud documentation page](/arduino-cloud/). +You can find more tutorials in the [Arduino Cloud documentation page](/arduino-cloud/). diff --git a/content/arduino-cloud/06.features/04.ota-getting-started/assets/OtA_board_selection.png b/content/arduino-cloud/06.features/04.ota-getting-started/assets/OtA_board_selection.png new file mode 100644 index 0000000000..ef7a07926b Binary files /dev/null and b/content/arduino-cloud/06.features/04.ota-getting-started/assets/OtA_board_selection.png differ diff --git a/content/arduino-cloud/06.features/04.ota-getting-started/assets/adding_variable.png b/content/arduino-cloud/06.features/04.ota-getting-started/assets/adding_variable.png new file mode 100644 index 0000000000..eed6550ae3 Binary files /dev/null and b/content/arduino-cloud/06.features/04.ota-getting-started/assets/adding_variable.png differ diff --git a/content/arduino-cloud/06.features/04.ota-getting-started/assets/dashboard_widget.png b/content/arduino-cloud/06.features/04.ota-getting-started/assets/dashboard_widget.png new file mode 100644 index 0000000000..59a8be3773 Binary files /dev/null and b/content/arduino-cloud/06.features/04.ota-getting-started/assets/dashboard_widget.png differ diff --git a/content/arduino-cloud/06.features/04.ota-getting-started/assets/device_OtA.png b/content/arduino-cloud/06.features/04.ota-getting-started/assets/device_OtA.png new file mode 100644 index 0000000000..a176249ebb Binary files /dev/null and b/content/arduino-cloud/06.features/04.ota-getting-started/assets/device_OtA.png differ diff --git a/content/arduino-cloud/06.features/04.ota-getting-started/assets/final_dashboard.png b/content/arduino-cloud/06.features/04.ota-getting-started/assets/final_dashboard.png new file mode 100644 index 0000000000..d59d44a65f Binary files /dev/null and b/content/arduino-cloud/06.features/04.ota-getting-started/assets/final_dashboard.png differ diff --git a/content/arduino-cloud/06.features/04.ota-getting-started/assets/iot_cloud_grid.png b/content/arduino-cloud/06.features/04.ota-getting-started/assets/iot_cloud_grid.png new file mode 100644 index 0000000000..d3cdecee0e Binary files /dev/null and b/content/arduino-cloud/06.features/04.ota-getting-started/assets/iot_cloud_grid.png differ diff --git a/content/arduino-cloud/02.features/04.ota-getting-started/assets/ota-supported-boards.png b/content/arduino-cloud/06.features/04.ota-getting-started/assets/ota-supported-boards.png similarity index 100% rename from content/arduino-cloud/02.features/04.ota-getting-started/assets/ota-supported-boards.png rename to content/arduino-cloud/06.features/04.ota-getting-started/assets/ota-supported-boards.png diff --git a/content/arduino-cloud/02.features/04.ota-getting-started/assets/other_power_supplier.png b/content/arduino-cloud/06.features/04.ota-getting-started/assets/other_power_supplier.png similarity index 100% rename from content/arduino-cloud/02.features/04.ota-getting-started/assets/other_power_supplier.png rename to content/arduino-cloud/06.features/04.ota-getting-started/assets/other_power_supplier.png diff --git a/content/arduino-cloud/06.features/04.ota-getting-started/assets/select_device.png b/content/arduino-cloud/06.features/04.ota-getting-started/assets/select_device.png new file mode 100644 index 0000000000..1fe6ab5770 Binary files /dev/null and b/content/arduino-cloud/06.features/04.ota-getting-started/assets/select_device.png differ diff --git a/content/arduino-cloud/02.features/04.ota-getting-started/ota-getting-started.md b/content/arduino-cloud/06.features/04.ota-getting-started/ota-getting-started.md similarity index 70% rename from content/arduino-cloud/02.features/04.ota-getting-started/ota-getting-started.md rename to content/arduino-cloud/06.features/04.ota-getting-started/ota-getting-started.md index 94a5a62198..d3d3072011 100644 --- a/content/arduino-cloud/02.features/04.ota-getting-started/ota-getting-started.md +++ b/content/arduino-cloud/06.features/04.ota-getting-started/ota-getting-started.md @@ -1,6 +1,5 @@ --- -title: "Uploading sketches Over-The-Air (OTA)" -difficulty: beginner +title: 'Over-The-Air (OTA)' description: 'Learn how to utilize Over-The-Air (OTA), a feature that allows you to upload sketches remotely.' tags: - OTA @@ -8,13 +7,13 @@ tags: author: 'Jose Garcia' --- -The new IoT Cloud brings a lot of new things, and one of them is the OTA (over-the-air) feature. This feature allows you to upload programs wirelessly to your Arduino boards. This way, as soon as you have a compatible board connected to a WiFi network and configured to work with OTA, you won’t need to physically connect the board to the computer in order to upload new sketches to it. Instead, everything will work over-the-air. +The new Arduino Cloud brings a lot of new things, and one of them is the OTA (over-the-air) feature. This feature allows you to upload programs wirelessly to your Arduino boards. This way, as soon as you have a compatible board connected to a WiFi network and configured to work with OTA, you won’t need to physically connect the board to the computer in order to upload new sketches to it. Instead, everything will work over-the-air. ![Over-the-Air uploads.](assets/other_power_supplier.png) -Over-the-air update is now available through [Arduino IoT Cloud](https://create.arduino.cc/iot/) and the [Arduino Web Editor](https://create.arduino.cc/editor), which is an always up-to-date online IDE that stores sketches in the Cloud. It also allows you to wirelessly upload sketches from a browser, to any board that is connected to that computer. +Over-the-air update is now available through [Arduino Cloud](app.arduino.cc) and the [Arduino Web Editor](https://create.arduino.cc/editor), which is an always up-to-date online IDE that stores sketches in the Cloud. It also allows you to wirelessly upload sketches from a browser, to any board that is connected to that computer. This tutorial will guide you through the necessary steps to configure your board to work with the OTA feature. @@ -48,29 +47,29 @@ The following ESP32 boards have been tested and verified to support OTA: ## How does it work -In order to configure the feature, we will need to create a project in the IoT Cloud following the next steps. +In order to configure the feature, we will need to create a project in the Arduino Cloud following the next steps. -**1.** Go to the [IoT Cloud](https://create.arduino.cc/iot/things) by opening the grid menu in any Arduino Site. +**1.** Go to the [Arduino Cloud](app.arduino.cc) by opening the grid menu in any Arduino Site. ![Navigating to the cloud.](assets/iot_cloud_grid.png) -> **Note:** You will need to have an Arduino account to be able to use both the Web editor and IoT Cloud features. +> **Note:** You will need to have an Arduino account to be able to use both the Web editor and Arduino Cloud features. -**2.** Once you are logged in the IoT Cloud, you need to create a new thing and name it “smart_led”. +**2.** Once you are logged in the Arduino Cloud, you need to create a new thing and name it “smart_led”. Inside the thing let’s include a boolean variable called `light`, activate the interaction **Modify from dashboard API** and select the **on change** variable update. Once we have these characteristics set, click on **add variable**. ![Adding a variable.](assets/adding_variable.png) -> **Note:** If you want to know more about how to get started with the Arduino IoT Cloud, visit the [getting started tutorial](/arduino-cloud/getting-started/iot-cloud-getting-started). +> **Note:** If you want to know more about how to get started with the Arduino Cloud, visit the [getting started tutorial](/arduino-cloud/guides/overview). **3.** Once you have added the variable, you’ll need to associate your device (Arduino MKR WiFi 1010 or Arduino Nano 33 IoT) to this new thing and add your network credentials. ![Selecting a device to associate.](assets/select_device.png) -***Note: If it is the first time you configure the MKR WiFi 1010 or the Nano 33 IoT board to the IoT Cloud, you will need to have the latest version of the WiFi Nina firmware installed. The configuration process updates it automatically. However, if you get any error during the configuration process, you can manually update the FW version of the Nina module following [these instructions](https://support.arduino.cc/hc/en-us/articles/360013896579-Check-and-update-the-firmware-for-WiFiNINA-and-WiFi101).*** +***Note: If it is the first time you configure the MKR WiFi 1010 or the Nano 33 IoT board to the Arduino Cloud, you will need to have the latest version of the WiFi Nina firmware installed. The configuration process updates it automatically. However, if you get any error during the configuration process, you can manually update the FW version of the Nina module following [these instructions](https://support.arduino.cc/hc/en-us/articles/360013896579-Check-and-update-the-firmware-for-WiFiNINA-and-WiFi101).*** **4.** Next step is to create a dashboard with a **Switch** widget, linked to the lights variable that you created before. Once it is set, click on the **use dashboard** button and go to **things > smart_led > Sketch** @@ -91,12 +90,12 @@ Check the highlighted lines in the following code to see what required changes a -**6.** Once the sketch has uploaded to your board, let’s check that everything is working as it should. To do so, go back to the IoT Cloud and once in there, go to the **smart_led** dashboard we created before. Now, when you turn the **light** widget in the dashboard ON or OFF, the LED in your board should also turn ON or OFF. +**6.** Once the sketch has uploaded to your board, let’s check that everything is working as it should. To do so, go back to the Arduino Cloud and once in there, go to the **smart_led** dashboard we created before. Now, when you turn the **light** widget in the dashboard ON or OFF, the LED in your board should also turn ON or OFF. -![Final dashboard.](assets/final_dshboard.png) +![Final dashboard.](assets/final_dashboard.png) -Now that we have checked that everything is working as it should, let’s go back to the **Things > smart_led >** **Sketch** tab in the IoT Cloud, and see what has happened there. +Now that we have checked that everything is working as it should, let’s go back to the **Things > smart_led >** **Sketch** tab in the Arduino Cloud, and see what has happened there. Once in the sketch tab, let’s open the board's drop down menu. There, a new option to connect our board should be available. The name of the board configured for the cloud will appear, followed by the **Over-the-Air** option. @@ -120,12 +119,12 @@ If you select this option, you should be able to upload sketches to your board w > **Note:** This option will take a bit longer than usual, since the process of compiling and uploading the program to the board over-the-air is a longer process. -**4.** Now, if you switch the widget on the IoT Cloud dashboard ON and OFF, the LED will either blink every second or go off. +**4.** Now, if you switch the widget on the Arduino Cloud dashboard ON and OFF, the LED will either blink every second or go off. ## But how does it work, inside? -An IoT Cloud sketch is generated by the IoT Cloud application, it leverages the Arduino IoT Cloud and [Arduino Connection Handler](https://github.com/arduino-libraries/Arduino_ConnectionHandler) libraries to give your sketch IoT powers. +An Arduino Cloud sketch is generated by the Arduino Cloud application, it leverages the Arduino Cloud and [Arduino Connection Handler](https://github.com/arduino-libraries/Arduino_ConnectionHandler) libraries to give your sketch IoT powers. When uploading a sketch over-the-air: @@ -157,4 +156,4 @@ If you want to continue learning about amazing IoT features or projects you can ### More tutorials -You can find more tutorials in the [Arduino IoT Cloud documentation page](/arduino-cloud/). +You can find more tutorials in the [Arduino Cloud documentation page](/arduino-cloud/). diff --git a/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img01.png b/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img01.png new file mode 100644 index 0000000000..893017ded2 Binary files /dev/null and b/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img01.png differ diff --git a/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img02.png b/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img02.png new file mode 100644 index 0000000000..6f2648bf36 Binary files /dev/null and b/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img02.png differ diff --git a/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img03.png b/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img03.png new file mode 100644 index 0000000000..6a6f641ed9 Binary files /dev/null and b/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img03.png differ diff --git a/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img04.png b/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img04.png new file mode 100644 index 0000000000..be62a8cf9e Binary files /dev/null and b/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img04.png differ diff --git a/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img05.png b/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img05.png new file mode 100644 index 0000000000..e2bb8db836 Binary files /dev/null and b/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img05.png differ diff --git a/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img06.png b/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img06.png new file mode 100644 index 0000000000..5880c44a58 Binary files /dev/null and b/content/arduino-cloud/06.features/05.sharing-dashboards/assets/cloud-sharing-dashboards-img06.png differ diff --git a/content/arduino-cloud/02.features/05.sharing-dashboards/sharing-dashboards.md b/content/arduino-cloud/06.features/05.sharing-dashboards/sharing-dashboards.md similarity index 78% rename from content/arduino-cloud/02.features/05.sharing-dashboards/sharing-dashboards.md rename to content/arduino-cloud/06.features/05.sharing-dashboards/sharing-dashboards.md index 6ab31954b8..50edc7a8bd 100644 --- a/content/arduino-cloud/02.features/05.sharing-dashboards/sharing-dashboards.md +++ b/content/arduino-cloud/06.features/05.sharing-dashboards/sharing-dashboards.md @@ -1,10 +1,9 @@ --- -title: 'Sharing dashboards' -difficulty: beginner +title: 'Sharing Dashboards' description: 'Learn how to share your dashboards with other Arduino Cloud users.' tags: - Dashboards - - Cloud + - Arduino Cloud author: 'Karl Söderby' software: - iot-cloud @@ -12,16 +11,16 @@ software: The Arduino Cloud IoT is a great tool for remote control and analytics of your devices. A central component in the cloud system is the **dashboards**, the tool that is used to visualize and interact with you devices. -In this tutorial, we will show how to share these dashboards with other Arduino IoT Cloud users! +In this tutorial, we will show how to share these dashboards with other Arduino Cloud users! -If you want to get started with the Arduino Cloud IoT, you can check out [getting started with the Arduino Cloud IoT](https://docs.arduino.cc/cloud/iot-cloud/tutorials/iot-cloud-getting-started). +If you want to get started with the Arduino Cloud IoT, you can check out [getting started with the Arduino Cloud IoT](/arduino-cloud/guides/overview). ## Sharing your dashboards ->**Note:** Before we start, let's make sure that we have a **Thing** and **Dashboard** already set up. If you haven't got that set up, check out the [Getting Started with Arduino IoT Cloud](/arduino-cloud/getting-started/iot-cloud-getting-started) tutorial. +>**Note:** Before we start, let's make sure that we have a **Thing** and **Dashboard** already set up. If you haven't got that set up, check out the [Getting Started with Arduino Cloud](/arduino-cloud/guides/overview) tutorial. -The Arduino IoT Cloud's dashboard feature is a really good tool for sending, receiving and storing data through the cloud. You can now also share your dashboards with other people, so that they can access your devices as well, without having access to your account! +The Arduino Cloud's dashboard feature is a really good tool for sending, receiving and storing data through the cloud. You can now also share your dashboards with other people, so that they can access your devices as well, without having access to your account! The **sharing dashboards** feature is really easy to use, but let's take a look at how it is done! @@ -59,4 +58,4 @@ In this tutorial, we have learned how to **share dashboards**, a feature that ca ### More tutorials -You can find more tutorials in the [Arduino IoT Cloud documentation page](/arduino-cloud/). \ No newline at end of file +You can find more tutorials in the [Arduino Cloud documentation page](/arduino-cloud/). \ No newline at end of file diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/dashboard_motion.gif b/content/arduino-cloud/06.features/06.thing-to-thing/assets/dashboard_motion.gif similarity index 100% rename from content/arduino-cloud/02.features/06.thing-to-thing/assets/dashboard_motion.gif rename to content/arduino-cloud/06.features/06.thing-to-thing/assets/dashboard_motion.gif diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-circuit.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-circuit.png similarity index 100% rename from content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-circuit.png rename to content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-circuit.png diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-00.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-00.png new file mode 100644 index 0000000000..d3cdecee0e Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-00.png differ diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-01.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-01.png new file mode 100644 index 0000000000..c308458394 Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-01.png differ diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-02.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-02.png new file mode 100644 index 0000000000..08fc651dfe Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-02.png differ diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-03.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-03.png new file mode 100644 index 0000000000..9dd0058e0f Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-03.png differ diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-04.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-04.png new file mode 100644 index 0000000000..64333504a1 Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-04.png differ diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-05.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-05.png new file mode 100644 index 0000000000..359c7d4cf6 Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-05.png differ diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-06.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-06.png new file mode 100644 index 0000000000..2e1f888792 Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-06.png differ diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-07.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-07.png new file mode 100644 index 0000000000..f253cc3e43 Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-07.png differ diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-08.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-08.png new file mode 100644 index 0000000000..9bd70daa62 Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-08.png differ diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-09.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-09.png new file mode 100644 index 0000000000..2766ebfb09 Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-09.png differ diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-10.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-10.png new file mode 100644 index 0000000000..df20a4e506 Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-10.png differ diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-11.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-11.png new file mode 100644 index 0000000000..b5f5e7d3ad Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-11.png differ diff --git a/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-12.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-12.png new file mode 100644 index 0000000000..ed154c581f Binary files /dev/null and b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-12.png differ diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-13.png b/content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-13.png similarity index 100% rename from content/arduino-cloud/02.features/06.thing-to-thing/assets/thing-to-thing-img-13.png rename to content/arduino-cloud/06.features/06.thing-to-thing/assets/thing-to-thing-img-13.png diff --git a/content/arduino-cloud/02.features/06.thing-to-thing/thing-to-thing.md b/content/arduino-cloud/06.features/06.thing-to-thing/thing-to-thing.md similarity index 88% rename from content/arduino-cloud/02.features/06.thing-to-thing/thing-to-thing.md rename to content/arduino-cloud/06.features/06.thing-to-thing/thing-to-thing.md index c96385fa22..8754e39964 100644 --- a/content/arduino-cloud/02.features/06.thing-to-thing/thing-to-thing.md +++ b/content/arduino-cloud/06.features/06.thing-to-thing/thing-to-thing.md @@ -1,16 +1,14 @@ --- -title: 'Thing to Thing communication with Arduino IoT Cloud' -compatible-products: [mkr-1000-wifi, mkr-wifi-1010, nano-33-iot, nano-rp2040-connect] -difficulty: beginner +title: 'Syncing Variables Across Things' description: 'Learn how two Things can communicate with each other through variable syncing.' tags: - - Device to device + - Variable Synchronization author: 'Karl Söderby' --- ## Introduction -The Thing to Thing communication is a great feature that allows you to synchronize your Arduino devices. It enables you to pair **variables** of the same data type between things and with the Arduino IoT Cloud, creating a two-way communication between your devices has never been easier. +The Thing to Thing communication is a great feature that allows you to synchronize your Arduino devices. It enables you to pair **variables** of the same data type between things and with the Arduino Cloud, creating a two-way communication between your devices has never been easier. ## Goals @@ -22,7 +20,7 @@ The goals of this project are: ## Hardware & Software needed -- [Arduino IoT Cloud](https://create.arduino.cc/iot/) (with a Maker subscription, read more [here](https://store.arduino.cc/digital/create)). +- [Arduino Cloud](app.arduino.cc) (with a Maker subscription, read more [here](https://store.arduino.cc/digital/create)). - 2x [Arduino MKR WiFi 1010](https://store.arduino.cc/mkr-wifi-1010) or, - 2x [Arduino MKR WiFi 1000](https://store.arduino.cc/arduino-mkr1000-wifi) or, - 2x [Arduino Nano 33 IoT](https://store.arduino.cc/arduino-nano-33-iot) or, @@ -31,19 +29,19 @@ The goals of this project are: ## Circuit -In this tutorial, we are using no external circuit. You will only need 2x IoT Cloud compatible devices. You can for example use one Nano 33 IoT and one MKR WiFi 1010. +In this tutorial, we are using no external circuit. You will only need 2x Arduino Cloud compatible devices. You can for example use one Nano 33 IoT and one MKR WiFi 1010. ![Choosing two IoT boards.](assets/thing-to-thing-circuit.png) ## Setting up the Things -To start, we will need to head over to the [Arduino IoT Cloud](https://create.arduino.cc/iot/). This is also accessible through the menu at the top right. +To start, we will need to head over to the [Arduino Cloud](app.arduino.cc). This is also accessible through the menu at the top right. ![Navigate to the cloud.](assets/thing-to-thing-img-00.png) ### Step 1: Configuring two devices -To enable Thing to Thing communication, we will first need to configure the two devices. If you have never used the Arduino IoT Cloud before, you can check out [our getting started with the IoT cloud guide](https://www.arduino.cc/en/Tutorial/iot-cloud-getting-started). +To enable Thing to Thing communication, we will first need to configure the two devices. If you have never used the Arduino Cloud before, you can check out [our getting started with the IoT cloud guide](https://www.arduino.cc/en/Tutorial/iot-cloud-getting-started). Now that we are working with two devices, it is important to separate them from each other, since they will later be linked to two different Things. In this tutorial, we named the devices: @@ -163,4 +161,4 @@ We hope you enjoyed this tutorial and that it helped you to get started with you ### More tutorials -You can find more tutorials in the [Arduino IoT Cloud documentation page](/arduino-cloud/). \ No newline at end of file +You can find more tutorials in the [Arduino Cloud documentation page](/arduino-cloud/). \ No newline at end of file diff --git a/content/arduino-cloud/01.getting-started/07.arduino-cloud-callbacks/arduino-cloud-callbacks.md b/content/arduino-cloud/06.features/07.arduino-cloud-callbacks/arduino-cloud-callbacks.md similarity index 78% rename from content/arduino-cloud/01.getting-started/07.arduino-cloud-callbacks/arduino-cloud-callbacks.md rename to content/arduino-cloud/06.features/07.arduino-cloud-callbacks/arduino-cloud-callbacks.md index 49e91d6d79..631a366805 100644 --- a/content/arduino-cloud/01.getting-started/07.arduino-cloud-callbacks/arduino-cloud-callbacks.md +++ b/content/arduino-cloud/06.features/07.arduino-cloud-callbacks/arduino-cloud-callbacks.md @@ -1,20 +1,20 @@ --- -title: 'IoT Cloud Event & Callbacks' +title: 'Event & Callbacks' description: 'Learn how to subscribe to events and add callback functions.' -tags: [IoT Cloud, Events, Callbacks] +tags: [Arduino Cloud, Events, Callbacks] author: 'Karl Söderby' --- -The [Arduino IoT Cloud](https://create.arduino.cc/iot/) has support for events and callbacks. This can be used to trigger specific functionalities depending on what state your device is in. +The [Arduino Cloud](app.arduino.cc) has support for events and callbacks. This can be used to trigger specific functionalities depending on what state your device is in. You can for example trigger a specific block of code whenever the board is in a **connecting**, **synchronized** or **disconnected** state. In this document, we will explore how to set it up, using an example from the [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud/blob/master/examples/ArduinoIoTCloud-Callbacks/ArduinoIoTCloud-Callbacks.ino) library. ## Events The `ArduinoIoTCloudEvent` enumeration class has three possible events: -- `CONNECT` (0) - Board successfully connects to IoT Cloud. -- `SYNC` (1) - Data is successfully synced between Board and IoT Cloud. -- `DISCONNECT` (2) - Board has lost connection to IoT Cloud. +- `CONNECT` (0) - Board successfully connects to Arduino Cloud. +- `SYNC` (1) - Data is successfully synced between Board and Arduino Cloud. +- `DISCONNECT` (2) - Board has lost connection to Arduino Cloud. The `CONNECT` and `DISCONNECT` events can occur even though no variable is created inside the Thing. However, `SYNC` requires a variable to be created, as this triggers whenever data is synchronized between the board and cloud. @@ -37,6 +37,6 @@ function whenever the `CONNECT` event occurs. ## Full Example -The example below demonstrates how to use events & callbacks in the IoT Cloud. +The example below demonstrates how to use events & callbacks in the Arduino Cloud. \ No newline at end of file diff --git a/content/arduino-cloud/06.features/08.iot-cloud-historical-data/assets/cloud-historical-data-confirmation.png b/content/arduino-cloud/06.features/08.iot-cloud-historical-data/assets/cloud-historical-data-confirmation.png new file mode 100644 index 0000000000..bd00d7b793 Binary files /dev/null and b/content/arduino-cloud/06.features/08.iot-cloud-historical-data/assets/cloud-historical-data-confirmation.png differ diff --git a/content/arduino-cloud/06.features/08.iot-cloud-historical-data/assets/cloud-historical-data-dashboard.png b/content/arduino-cloud/06.features/08.iot-cloud-historical-data/assets/cloud-historical-data-dashboard.png new file mode 100644 index 0000000000..de7d873de7 Binary files /dev/null and b/content/arduino-cloud/06.features/08.iot-cloud-historical-data/assets/cloud-historical-data-dashboard.png differ diff --git a/content/arduino-cloud/06.features/08.iot-cloud-historical-data/assets/cloud-historical-data-selecting-variable.png b/content/arduino-cloud/06.features/08.iot-cloud-historical-data/assets/cloud-historical-data-selecting-variable.png new file mode 100644 index 0000000000..95332a5faa Binary files /dev/null and b/content/arduino-cloud/06.features/08.iot-cloud-historical-data/assets/cloud-historical-data-selecting-variable.png differ diff --git a/content/arduino-cloud/06.features/08.iot-cloud-historical-data/assets/cloud-historical-data.png b/content/arduino-cloud/06.features/08.iot-cloud-historical-data/assets/cloud-historical-data.png new file mode 100644 index 0000000000..c61e6983ca Binary files /dev/null and b/content/arduino-cloud/06.features/08.iot-cloud-historical-data/assets/cloud-historical-data.png differ diff --git a/content/arduino-cloud/02.features/08.iot-cloud-historical-data/iot-cloud-historical-data.md b/content/arduino-cloud/06.features/08.iot-cloud-historical-data/iot-cloud-historical-data.md similarity index 87% rename from content/arduino-cloud/02.features/08.iot-cloud-historical-data/iot-cloud-historical-data.md rename to content/arduino-cloud/06.features/08.iot-cloud-historical-data/iot-cloud-historical-data.md index 0e062c7c1b..3ded108f97 100644 --- a/content/arduino-cloud/02.features/08.iot-cloud-historical-data/iot-cloud-historical-data.md +++ b/content/arduino-cloud/06.features/08.iot-cloud-historical-data/iot-cloud-historical-data.md @@ -1,14 +1,13 @@ --- -title: 'Historical Data on Arduino IoT Cloud' -difficulty: beginner -description: 'Learn how to download historical data from the Arduino IoT Cloud' -tags: [IoT Cloud, Historical Data, CSV] +title: 'Download Historical Data' +description: 'Learn how to download historical data from the Arduino Cloud' +tags: [Arduino Cloud, Historical Data, CSV] author: 'Benjamin Dannegård' --- ## Introduction -It is possible to download historical data from your [Arduino IoT Cloud](https://create.arduino.cc/iot/) Things and Variables. It is downloaded in `.csv` format, and can be used for data comparison. +It is possible to download historical data from your [Arduino Cloud](app.arduino.cc) Things and Variables. It is downloaded in `.csv` format, and can be used for data comparison. ## Goals @@ -23,7 +22,7 @@ You do not need an active board to download the historical data, but for initial To see all compatible boards, check out the link below: -- [Arduino IoT Cloud compatible boards](/cloud/iot-cloud/tutorials/iot-cloud-getting-started#compatible-hardware). +- [Arduino Cloud compatible boards](/arduino-cloud/hardware/devices#type-of-devices). ### Different Historical Data @@ -43,7 +42,7 @@ Combined with 15 days or three months of historical data, you can build a detail ### Downloading Historical Data -First, to download historical data navigate into one of your dashboards on the [Arduino IoT Cloud](https://create.arduino.cc/iot/dashboards). +First, to download historical data navigate into one of your dashboards on the [Arduino Cloud](app.arduino.cc/dashboards). ![Arduino cloud dashboard.](assets/cloud-historical-data-dashboard.png) @@ -63,4 +62,4 @@ In the next window, click on the **"Get Data"** button. The download link will n ## Conclusion -In this tutorial you learned what applications historical data could have, and how to extract historical data from your Arduino IoT Cloud dashboard. \ No newline at end of file +In this tutorial you learned what applications historical data could have, and how to extract historical data from your Arduino Cloud dashboard. \ No newline at end of file diff --git a/content/arduino-cloud/01.getting-started/10.manual-device/assets/api-key.png b/content/arduino-cloud/06.features/08.manual-device/assets/api-key.png similarity index 100% rename from content/arduino-cloud/01.getting-started/10.manual-device/assets/api-key.png rename to content/arduino-cloud/06.features/08.manual-device/assets/api-key.png diff --git a/content/arduino-cloud/01.getting-started/10.manual-device/assets/configure-manual-device.png b/content/arduino-cloud/06.features/08.manual-device/assets/configure-manual-device.png similarity index 100% rename from content/arduino-cloud/01.getting-started/10.manual-device/assets/configure-manual-device.png rename to content/arduino-cloud/06.features/08.manual-device/assets/configure-manual-device.png diff --git a/content/arduino-cloud/01.getting-started/10.manual-device/manual-devices.md b/content/arduino-cloud/06.features/08.manual-device/manual-devices.md similarity index 87% rename from content/arduino-cloud/01.getting-started/10.manual-device/manual-devices.md rename to content/arduino-cloud/06.features/08.manual-device/manual-devices.md index 48857a0212..636c82ae4b 100644 --- a/content/arduino-cloud/01.getting-started/10.manual-device/manual-devices.md +++ b/content/arduino-cloud/06.features/08.manual-device/manual-devices.md @@ -1,21 +1,21 @@ --- -title: Configuring Manual Devices -description: Connect to the Arduino IoT Cloud any kind of device that uses Python, MicroPython or JavaScript (Node.js) +title: Manual Devices +description: Connect to the Arduino Cloud any kind of device that uses Python, MicroPython or JavaScript (Node.js) author: Karl Söderby -tags: [IoT Cloud, Device API, JavaScript, Node.js, Python, MicroPython] +tags: [Arduino Cloud, Device API, JavaScript, Node.js, Python, MicroPython] --- -Authentication & data synchronisation is automatically handled when you choose the automatic configuration option in the [Arduino IoT Cloud](https://create.arduino.cc/iot/). +Authentication & data synchronisation is automatically handled when you choose the automatic configuration option in the [Arduino Cloud](app.arduino.cc). You can during the setup of your device instead choose the manual configuration option. This allows you to connect to the cloud using the **Device API** (MicroPython, Python or Node.js). -This opens up possibilities for more kinds of devices, mainly Linux based, to connect to the Arduino IoT Cloud. +This opens up possibilities for more kinds of devices, mainly Linux based, to connect to the Arduino Cloud. -***Manual configuration is recommended for more advanced users, mainly those that are looking to integrate existing projects with the Arduino IoT Cloud.*** +***Manual configuration is recommended for more advanced users, mainly those that are looking to integrate existing projects with the Arduino Cloud.*** ## Goals -In this article you will learn how to configure a manual device, and how to connect to the Arduino IoT Cloud with: +In this article you will learn how to configure a manual device, and how to connect to the Arduino Cloud with: - MicroPython - Python - JavaScript (Node.js) @@ -31,7 +31,7 @@ Each method of interaction with the Device API requires various levels of comple ## Device API -The **Device API** allows you to interact with the Arduino IoT Cloud MQTT broker, by sending/receiving updates from your IoT Cloud variables. +The **Device API** allows you to interact with the Arduino Cloud MQTT broker, by sending/receiving updates from your Arduino Cloud variables. This API is ideal for you who'd like to integrate existing Python or JavaScript projects with Arduino. @@ -43,7 +43,7 @@ Note that the Device API is designed to interact with the MQTT broker. To manage ## Configure Manual Devices -To configure a manual device, go to [devices in the IoT Cloud](https://create.arduino.cc/iot/devices), and click the **"Add"** button. This will open a new window, where you will be asked to either configure automatically, or manually. Choose the **"Manual"** option. +To configure a manual device, go to [devices in the Arduino Cloud](app.arduino.cc/devices), and click the **"Add"** button. This will open a new window, where you will be asked to either configure automatically, or manually. Choose the **"Manual"** option. ![Add a new device.](assets/configure-manual-device.png) @@ -57,7 +57,7 @@ After you have created your device, you need to link it to a Thing before using ## MicroPython -The pre-requisities for connecting the the IoT Cloud via MicroPython are: +The pre-requisities for connecting the the Arduino Cloud via MicroPython are: - A [GIGA R1 WiFi](https://store.arduino.cc/products/giga-r1-wifi) / [Portenta H7](https://store.arduino.cc/products/portenta-h7) board with MicroPython installed, - [Arduino Lab for MicroPython](https://labs.arduino.cc/en/labs/micropython) code editor, - [arduino-iot-cloud-py](https://github.com/arduino/arduino-iot-cloud-py) installed, @@ -65,7 +65,7 @@ The pre-requisities for connecting the the IoT Cloud via MicroPython are: To install MicroPython, you can check out the [Installation Guide](/micropython/basics/board-installation#giga-r1-wifi). The installation process is the same for both boards as they are based on the same MCU (STM32H7). -To connect with MicroPython, you will need to have a manual device created in the IoT Cloud. When you create it, you will receive a **Device ID** and a **Secret Key**. +To connect with MicroPython, you will need to have a manual device created in the Arduino Cloud. When you create it, you will receive a **Device ID** and a **Secret Key**. ### MicroPython Example @@ -118,7 +118,7 @@ if __name__ == "__main__": # NOTE: Add networking code here or in boot.py wifi_connect() - # Create a client object to connect to the Arduino IoT cloud. + # Create a client object to connect to the Arduino Cloud. # For MicroPython, the key and cert files must be stored in DER format on the filesystem. # Alternatively, a username and password can be used to authenticate: client = ArduinoCloudClient(device_id=DEVICE_ID, username=DEVICE_ID, password=SECRET_KEY) @@ -132,18 +132,18 @@ if __name__ == "__main__": # This cloud object is updated manually in the switch's on_write_change callback to update the LED state in the cloud. client.register("led", value=None) - # Start the Arduino IoT cloud client. + # Start the Arduino Cloud client. client.start() ``` -For a more details, you can visit a more complete guide at [Connecting to Arduino IoT Cloud using MicroPython](/arduino-cloud/getting-started/iot-cloud-micropython). +For a more details, you can visit a more complete guide at [Connecting to Arduino Cloud using MicroPython](/arduino-cloud/getting-started/iot-cloud-micropython). ## Python The pre-requisities for connecting with Python is: - [Python](https://www.python.org/) installed on your machine (this is tested and confirmed to work with v3.11), - [arduino-iot-cloud-py](https://github.com/arduino/arduino-iot-cloud-py) installed, -- a Thing + [manual device](#configure-manual-devices) created in the Arduino IoT Cloud. +- a Thing + [manual device](#configure-manual-devices) created in the Arduino Cloud. Connection to the cloud via Python uses the same API as the MicroPython example listed in this article. To install the [arduino-iot-cloud-py](https://github.com/arduino/arduino-iot-cloud-py) module, we can use `pip`. @@ -226,8 +226,8 @@ Once you run the script, you will start the client and you will be able to inter The pre-requisities for connecting with Node.js is: - [Node.js](https://nodejs.org/en) installed on your machine (this is tested and confirmed to work with v20.2.0), - [arduino-iot-js](https://github.com/arduino/arduino-iot-js) installed, -- a Thing created in the Arduino IoT Cloud, -- a manual device created in the Arduino IoT Cloud, associated to your Thing. +- a Thing created in the Arduino Cloud, +- a manual device created in the Arduino Cloud, associated to your Thing. Connection to the cloud via Node.js/Javascript requires you to first install the [arduino-iot-js](https://github.com/arduino/arduino-iot-js) package. You will also need to configure a manual device in the cloud, which will generate the **Device ID** and **Secret Key** needed to connect. @@ -241,7 +241,7 @@ After installation, you can use the example below to connect and send variable u This example connects to the cloud (MQTT broker), and sends a variable update with `sendProperty()`, and then listens for updates using the `onPropertyValue()` method. -***Please note: `cloudVar` needs to contain the variable name you create in the Arduino IoT Cloud. In this case, we are calling it `test_variable`*** +***Please note: `cloudVar` needs to contain the variable name you create in the Arduino Cloud. In this case, we are calling it `test_variable`*** ```js const { ArduinoIoTCloud } = require('arduino-iot-js'); @@ -277,7 +277,7 @@ test_variable: ## Summary -In this article, you have learned about the Arduino IoT Cloud's **Device API**, and how to connect to it using MicroPython, Python & JavaScript (Node.js). +In this article, you have learned about the Arduino Cloud's **Device API**, and how to connect to it using MicroPython, Python & JavaScript (Node.js). This API makes it easier to integrate existing software projects written in Python & JavaScript. diff --git a/content/arduino-cloud/02.features/09.advanced-chart/advanced-chart.md b/content/arduino-cloud/06.features/09.advanced-chart/advanced-chart.md similarity index 88% rename from content/arduino-cloud/02.features/09.advanced-chart/advanced-chart.md rename to content/arduino-cloud/06.features/09.advanced-chart/advanced-chart.md index 596978fe11..3432e97342 100644 --- a/content/arduino-cloud/02.features/09.advanced-chart/advanced-chart.md +++ b/content/arduino-cloud/06.features/09.advanced-chart/advanced-chart.md @@ -2,10 +2,10 @@ title: Multiple Variable Chart Widget description: Learn how to use the advanced chart widget, which allows you to track several variables in real time or during a specific time period. author: Karl Söderby -tags: [IoT Cloud, Charts, Data Plotting] +tags: [Arduino Cloud, Charts, Data Plotting] --- -The **advanced chart widget** is used to display data from several IoT Cloud variables in a single chart. You can track the data in both real time, select from a specific time period while selecting the variables you want to display. +The **advanced chart widget** is used to display data from several Arduino Cloud variables in a single chart. You can track the data in both real time, select from a specific time period while selecting the variables you want to display. ![The advanced chart widget.](assets/advanced-chart.gif) @@ -21,8 +21,8 @@ For example, you could set up a series of sensors around a city, and measure the ## Hardware & Software Needed -- [Arduino IoT Cloud](https://create.arduino.cc/iot/). -- Cloud compatible boards, [see full list](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started#compatible-hardware). +- [Arduino Cloud](app.arduino.cc). +- Cloud compatible boards, [see full list](https://docs.arduino.cc/arduino-cloud/guides/overview#compatible-hardware). ***In this tutorial, we use the [MKR WiFi 1010](/hardware/mkr-wifi-1010) and [MKR ENV Shield](/hardware/mkr-env-shield) for recording environmental values. This is not a requirement, you can use any board for this tutorial.*** @@ -34,9 +34,9 @@ To use the advanced widget, you will need to set up a Thing and some variables t - `pressure` - `light` -***If you are unfamiliar with how to set up a Thing and variables, head on over to the [Getting Started with the Arduino IoT Cloud](/arduino-cloud/getting-started/iot-cloud-getting-started) article.*** +***If you are unfamiliar with how to set up a Thing and variables, head on over to the [Getting Started with the Arduino Cloud](/arduino-cloud/guides/overview) article.*** -**1.** Head on over to the **"Dashboards"** in the Arduino IoT Cloud, and create a new dashboard (or use an existing dashboard). +**1.** Head on over to the **"Dashboards"** in the Arduino Cloud, and create a new dashboard (or use an existing dashboard). **2.** Add a new **"Advanced Chart Widget"**, selecting it from the list of available widgets. diff --git a/content/arduino-cloud/02.features/09.advanced-chart/assets/advanced-chart-toggle.gif b/content/arduino-cloud/06.features/09.advanced-chart/assets/advanced-chart-toggle.gif similarity index 100% rename from content/arduino-cloud/02.features/09.advanced-chart/assets/advanced-chart-toggle.gif rename to content/arduino-cloud/06.features/09.advanced-chart/assets/advanced-chart-toggle.gif diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/advanced-chart.gif b/content/arduino-cloud/06.features/09.advanced-chart/assets/advanced-chart.gif similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/advanced-chart.gif rename to content/arduino-cloud/06.features/09.advanced-chart/assets/advanced-chart.gif diff --git a/content/arduino-cloud/02.features/09.advanced-chart/assets/light-tracking.png b/content/arduino-cloud/06.features/09.advanced-chart/assets/light-tracking.png similarity index 100% rename from content/arduino-cloud/02.features/09.advanced-chart/assets/light-tracking.png rename to content/arduino-cloud/06.features/09.advanced-chart/assets/light-tracking.png diff --git a/content/arduino-cloud/02.features/09.advanced-chart/assets/select-time-date.png b/content/arduino-cloud/06.features/09.advanced-chart/assets/select-time-date.png similarity index 100% rename from content/arduino-cloud/02.features/09.advanced-chart/assets/select-time-date.png rename to content/arduino-cloud/06.features/09.advanced-chart/assets/select-time-date.png diff --git a/content/arduino-cloud/02.features/09.advanced-chart/assets/select-variables.png b/content/arduino-cloud/06.features/09.advanced-chart/assets/select-variables.png similarity index 100% rename from content/arduino-cloud/02.features/09.advanced-chart/assets/select-variables.png rename to content/arduino-cloud/06.features/09.advanced-chart/assets/select-variables.png diff --git a/content/arduino-cloud/02.features/09.advanced-chart/assets/widget-config.png b/content/arduino-cloud/06.features/09.advanced-chart/assets/widget-config.png similarity index 100% rename from content/arduino-cloud/02.features/09.advanced-chart/assets/widget-config.png rename to content/arduino-cloud/06.features/09.advanced-chart/assets/widget-config.png diff --git a/content/arduino-cloud/02.features/09.advanced-chart/hero-banner.png b/content/arduino-cloud/06.features/09.advanced-chart/hero-banner.png similarity index 100% rename from content/arduino-cloud/02.features/09.advanced-chart/hero-banner.png rename to content/arduino-cloud/06.features/09.advanced-chart/hero-banner.png diff --git a/content/arduino-cloud/02.features/11.webhooks/assets/creating-an-applet.gif b/content/arduino-cloud/06.features/11.webhooks/assets/creating-an-applet.gif similarity index 100% rename from content/arduino-cloud/02.features/11.webhooks/assets/creating-an-applet.gif rename to content/arduino-cloud/06.features/11.webhooks/assets/creating-an-applet.gif diff --git a/content/arduino-cloud/06.features/11.webhooks/assets/ezgif.com-crop.gif b/content/arduino-cloud/06.features/11.webhooks/assets/ezgif.com-crop.gif new file mode 100644 index 0000000000..4705829e14 Binary files /dev/null and b/content/arduino-cloud/06.features/11.webhooks/assets/ezgif.com-crop.gif differ diff --git a/content/arduino-cloud/02.features/11.webhooks/assets/finding-webhook-link.png b/content/arduino-cloud/06.features/11.webhooks/assets/finding-webhook-link.png similarity index 100% rename from content/arduino-cloud/02.features/11.webhooks/assets/finding-webhook-link.png rename to content/arduino-cloud/06.features/11.webhooks/assets/finding-webhook-link.png diff --git a/content/arduino-cloud/02.features/11.webhooks/assets/setting-a-webhook.gif b/content/arduino-cloud/06.features/11.webhooks/assets/setting-a-webhook.gif similarity index 100% rename from content/arduino-cloud/02.features/11.webhooks/assets/setting-a-webhook.gif rename to content/arduino-cloud/06.features/11.webhooks/assets/setting-a-webhook.gif diff --git a/content/arduino-cloud/02.features/11.webhooks/assets/webhook-dashboard-sheets.gif b/content/arduino-cloud/06.features/11.webhooks/assets/webhook-dashboard-sheets.gif similarity index 100% rename from content/arduino-cloud/02.features/11.webhooks/assets/webhook-dashboard-sheets.gif rename to content/arduino-cloud/06.features/11.webhooks/assets/webhook-dashboard-sheets.gif diff --git a/content/arduino-cloud/02.features/11.webhooks/assets/webhook-dashboard.gif b/content/arduino-cloud/06.features/11.webhooks/assets/webhook-dashboard.gif similarity index 100% rename from content/arduino-cloud/02.features/11.webhooks/assets/webhook-dashboard.gif rename to content/arduino-cloud/06.features/11.webhooks/assets/webhook-dashboard.gif diff --git a/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-01.png b/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-01.png new file mode 100644 index 0000000000..b8f57646a8 Binary files /dev/null and b/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-01.png differ diff --git a/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-02.png b/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-02.png new file mode 100644 index 0000000000..10432eeb39 Binary files /dev/null and b/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-02.png differ diff --git a/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-03.png b/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-03.png new file mode 100644 index 0000000000..b4a8dcfd62 Binary files /dev/null and b/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-03.png differ diff --git a/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-04.png b/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-04.png new file mode 100644 index 0000000000..13ff930ad6 Binary files /dev/null and b/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-04.png differ diff --git a/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-05.png b/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-05.png new file mode 100644 index 0000000000..e5b79c4c7c Binary files /dev/null and b/content/arduino-cloud/06.features/11.webhooks/assets/webhooks-05.png differ diff --git a/content/arduino-cloud/02.features/11.webhooks/iot-cloud-webhooks.md b/content/arduino-cloud/06.features/11.webhooks/iot-cloud-webhooks.md similarity index 64% rename from content/arduino-cloud/02.features/11.webhooks/iot-cloud-webhooks.md rename to content/arduino-cloud/06.features/11.webhooks/iot-cloud-webhooks.md index 3d0c852ff9..c0b2efe56e 100644 --- a/content/arduino-cloud/02.features/11.webhooks/iot-cloud-webhooks.md +++ b/content/arduino-cloud/06.features/11.webhooks/iot-cloud-webhooks.md @@ -1,11 +1,9 @@ --- -title: 'Webhooks with Arduino IoT Cloud' -compatible-products: [mkr-1000-wifi, mkr-wifi-1010, nano-33-iot, nano-rp2040-connect] -difficulty: advanced -description: 'Learn how to setup webhooks with the Arduino IoT Cloud to work with third party platforms such as IFTTT.' +title: 'Webhooks' +description: 'Learn how to setup webhooks with the Arduino Cloud to work with third party platforms such as IFTTT.' tags: - Webhooks - - IoT Cloud + - Arduino Cloud - IFTTT author: 'Liam Aljundi' --- @@ -16,9 +14,9 @@ Webhooks allow you to send and receive automated messages to and from other serv ## Goals -- Learn how to set up webhooks in the Arduino IoT Cloud. +- Learn how to set up webhooks in the Arduino Cloud. - Provide an overview of available platforms where webhooks may be used. -- Demonstrate an example that uses a webhook to send data from the Arduino IoT Cloud to Google Sheets, via the IFTTT platform. +- Demonstrate an example that uses a webhook to send data from the Arduino Cloud to Google Sheets, via the IFTTT platform. ## Hardware & Software Requirements @@ -27,25 +25,15 @@ Webhooks allow you to send and receive automated messages to and from other serv You will also need a cloud compatible board: -- [MKR 1000 WiFi](https://store.arduino.cc/arduino-mkr1000-wifi) -- [MKR WiFi 1010](https://store.arduino.cc/arduino-mkr-wifi-1010) -- [MKR WAN 1300](https://store.arduino.cc/arduino-mkr-wan-1300-lora-connectivity-1414) -- [MKR WAN 1310](https://store.arduino.cc/mkr-wan-1310) -- [MKR GSM 1400](https://store.arduino.cc/arduino-mkr-gsm-1400)\* -- [MKR NB 1500](https://store.arduino.cc/arduino-mkr-nb-1500-1413)\* -- [Nano RP2040 Connect](https://store.arduino.cc/nano-rp2040-connect) -- [Nano 33 IoT](https://store.arduino.cc/arduino-nano-33-iot) -- [Portenta H7](https://store.arduino.cc/portenta-h7) - -***Please note: The MKR GSM 1400 and MKR NB 1500 require a SIM card to connect to the cloud, as they communicate over mobile networks.*** +***Read more about compatible board [here](/arduino-cloud/guides/overview#compatible-boards)*** ## Webhook Setup -A webhook can be set for any **Thing** on the Arduino IoT Cloud, allowing us to send data from the Arduino IoT Cloud to various third party platforms. For example, you can use webhooks to receive an email when any of you devices is disconnected, or send and save live sensor values collected from your device in a Google Spreadsheet. +A webhook can be set for any **Thing** on the Arduino Cloud, allowing us to send data from the Arduino Cloud to various third party platforms. For example, you can use webhooks to receive an email when any of you devices is disconnected, or send and save live sensor values collected from your device in a Google Spreadsheet. There are many available platforms that support the use of Webhooks, for this tutorial we will try the **IFTTT** platform. IFTTT allows you to integrate services with your DIY projects. With IFTTT you can create Applets that work with any device or app that can make or receive a web request. -Let's try it out by creating an Applet that uses a webhook to receive String Values sent via the **Message Widget** on the Arduino IoT Cloud, and save them into a Google Sheets. +Let's try it out by creating an Applet that uses a webhook to receive String Values sent via the **Message Widget** on the Arduino Cloud, and save them into a Google Sheets. ### IFTTT Configuration @@ -71,7 +59,7 @@ The first step is to create an Applet on the IFTTT platform using the following Both the trigger and action have now been configured. Click **Continue**. Optionally, change the applet title, and click **Finish** to create the applet. -The final step is finding the webhook link that you will need to set to your Thing on the Arduino IoT Cloud. You can find the link under **Profile picture in the top right > My Services > Webhooks > Documentation.** +The final step is finding the webhook link that you will need to set to your Thing on the Arduino Cloud. You can find the link under **Profile picture in the top right > My Services > Webhooks > Documentation.** ![Finding the Webhook link](assets/finding-webhook-link.png) @@ -79,23 +67,27 @@ The final step is finding the webhook link that you will need to set to your Thi Linking a webhook to a Thing is a quite simple process, follow the steps below to set a webhook to your Thing: -![Setting a webhook](assets/setting-a-webhook.gif) - -**1.** [Sign in to your Arduino account](https://create.arduino.cc/iot), and open the [Arduino IoT Cloud](https://create.arduino.cc/iot). +**1.** [Sign in to your Arduino account](https://create.arduino.cc/iot), and open the [Arduino Cloud](https://create.arduino.cc/iot). -**2.** Navigate to [**Things** -> **Create Thing**](https://create.arduino.cc/iot/things). +**2.** Navigate to [**Things** -> **Create Thing**](app.arduino.cc/things). **3.** Create your Variables. In our case, we will create a **"message"** Variable and set its type to **"Character String"**. +![Create Variable](./assets/webhooks-01.png) + **4.** Add your **Device**, and configure your **Network** from the right side menu. **5.** Click on "**Set Webhook**", one the bottom left corner. +![Set Webhook](./assets/webhooks-02.png) + **6.** Enter the webhook link provided from the platform you are using. +![Enter Webhook](./assets/webhooks-03.png) + **7.** Finally, navigate to the **Sketch** tab, and upload the automatically generated code to your board. -The Arduino IoT Cloud will share **five sets of values** through the assigned webhook: +The Arduino Cloud will share **five sets of values** through the assigned webhook: - `"event_id": "EVENT_UUID"` - `"webhook_id": "WEBHOOK_ID"` @@ -115,7 +107,7 @@ The fifth value contains an array of objects, each representing a Variable in yo "persist": true/false, "updated_at": "DATE", "created_by": "USERID" - }, + },1 { "id": "VARIABLE_02_ID", "name": "NAME_OF_VARIABLE_02", @@ -131,17 +123,19 @@ The fifth value contains an array of objects, each representing a Variable in yo To test the webhook, we need to create a *Messenger widget*. We can do that by: -![Setting a webhook](assets/webhook-dashboard.gif) +**1.** Navigating to [*Dashboards*](app.arduino.cc/dashboards) -> *Edit* -> *Add* -> stay on the *Widgets tab* -> select "Messenger". -**1.** Navigating to [*Dashboards*](https://create.arduino.cc/iot/dashboards) -> *Edit* -> *Add* -> stay on the *Widgets tab* -> select "Messenger". +![Add Messenger Widget](./assets/webhooks-04.png) **2.** Press on *Link Variable*, select the Thing we created, then the **"message"** Variable. +![Link Widge](./assets/webhooks-05.png) + In the "messenger widget", we are modifying the value of the "message" Variable. Whenever we send a message, the "message" Variable is updated and using the webhook we set, the updates are sent to the spreadsheet file created by IFTTT. -To try it out, all you need to do is to navigate to your **Dashboards** on the Arduino IoT Cloud and send messages using the **Messenger Widget**. The messages, along with the exact date and time will be found in the Google Sheets file created by IFTTT, on our Google account. To access this file, you need to navigate to your [Google Sheets](https://docs.google.com/spreadsheets) -> find and open the file names **"IFTTT_Maker_Webhooks_Events"**. +To try it out, all you need to do is to navigate to your **Dashboards** on the Arduino Cloud and send messages using the **Messenger Widget**. The messages, along with the exact date and time will be found in the Google Sheets file created by IFTTT, on our Google account. To access this file, you need to navigate to your [Google Sheets](https://docs.google.com/spreadsheets) -> find and open the file names **"IFTTT_Maker_Webhooks_Events"**. -![Setting a webhook](assets/webhook-dashboard-sheets.gif) +![Setting a webhook](assets/ezgif.com-crop.gif) ## Available Platforms @@ -153,6 +147,6 @@ In addition to IFTTT, here are examples of platforms that you can use webhooks w ### Google Services -- [**Google Cloud APIs**](https://cloud.google.com/apis/docs/overview): with Google APIs you can develop application programming interfaces (APIs) to communicate with Google services such as Search, Gmail, Translate or Google Maps apps or other applications like Arduino IoT Cloud. +- [**Google Cloud APIs**](https://cloud.google.com/apis/docs/overview): with Google APIs you can develop application programming interfaces (APIs) to communicate with Google services such as Search, Gmail, Translate or Google Maps apps or other applications like Arduino Cloud. - [**Google Script**](https://developers.google.com/apps-script): allows you to interact with all your Google G-Suite files such as Google Sheets, Docs and more. diff --git a/content/arduino-cloud/02.features/features.md b/content/arduino-cloud/06.features/features.md similarity index 100% rename from content/arduino-cloud/02.features/features.md rename to content/arduino-cloud/06.features/features.md diff --git a/content/arduino-cloud/01.getting-started/04.api-overview/api-overview.md b/content/arduino-cloud/07.api/01.api-overview/api-overview.md similarity index 71% rename from content/arduino-cloud/01.getting-started/04.api-overview/api-overview.md rename to content/arduino-cloud/07.api/01.api-overview/api-overview.md index 0858001c64..4103f1ad4e 100644 --- a/content/arduino-cloud/01.getting-started/04.api-overview/api-overview.md +++ b/content/arduino-cloud/07.api/01.api-overview/api-overview.md @@ -1,11 +1,11 @@ --- -title: Arduino IoT Cloud APIs -description: Arduino IoT Cloud has two different set of APIs. Read below to learn more +title: APIs Overview +description: Arduino Cloud has two different set of APIs - Application and Device API. author: Karl Söderby, Fabrizio Mirabito -tags: [IoT Cloud, Device API, Application API, JavaScript] +tags: [Arduino Cloud, Device API, Application API, JavaScript] --- -The [Arduino IoT Cloud](https://create.arduino.cc/iot/) has different sets of APIs that provide different functionalities. This article serves as an introduction to how to work and what you can achieve with them. +The [Arduino Cloud](app.arduino.cc) has different sets of APIs that provide different functionalities. This article serves as an introduction to how to work and what you can achieve with them. ## Application API @@ -23,7 +23,7 @@ With this API, you can: ### Resources -You can find the full list of available resources and actions in the [Arduino IoT Cloud Application API Technical Reference](https://www.arduino.cc/reference/en/iot/api/). +You can find the full list of available resources and actions in the [Arduino Cloud Application API Technical Reference](https://www.arduino.cc/reference/en/iot/api/). ***For learning how to successfully authenticate and interface with this API, visit the [Arduino Cloud REST API & SDK](https://docs.arduino.cc/arduino-cloud/getting-started/arduino-iot-api) article. Examples using JavaScript, Python and Golang are available here.*** @@ -42,23 +42,23 @@ With this API, you can: As a wrapper for the Device API, we have the following libraries: -- An official Arduino IoT Cloud Library for your Arduino sketches: `ArduinoIoTCloud.h` +- An official Arduino Cloud Library for your Arduino sketches: `ArduinoIoTCloud.h` - An NPM Javascript package: `arduino-iot-js` -### Arduino IoT Cloud Sketch library +### ArduinoIoTCloud Library -The Arduino (C++) library allows your Arduino devices to connect and exchange data with the IoT Cloud. If you use the Arduino Cloud online environment, you do not need to install this library. +The Arduino (C++) library allows your Arduino devices to connect and exchange data with the Arduino Cloud. If you use the Arduino Cloud online environment, you do not need to install this library. This library is also available in the library manager for [Arduino IDE](https://www.arduino.cc/en/software). With a paid subscription, you can push/pull changes to your online sketches in the offline editor. You can find more details at: -- The [official repository](https://github.com/arduino-libraries/ArduinoIoTCloud) -- The [cheat sheet](https://docs.arduino.cc/arduino-cloud/getting-started/technical-reference) +- The [official repository](https://github.com/arduino-libraries/ArduinoIoTCloud). +- The [Arduino C++ Library](/arduino-cloud/api/c-library) section. ### Arduino IoT JS -The `arduino-iot-js` NPM module is designed for communicating with the Arduino IoT Cloud broker using the MQTT over Websocket protocol. It is primarily used to send and receive variable values. +The `arduino-iot-js` NPM module is designed for communicating with the Arduino Cloud broker using the MQTT over Websocket protocol. It is primarily used to send and receive variable values. Example: @@ -67,7 +67,7 @@ const { ArduinoIoTCloud } = require('@arduino/arduino-iot-js'); ArduinoIoTCloud.connect(options) .then(() => { - console.log("Connected to Arduino IoT Cloud"); + console.log("Connected to Arduino Cloud"); return ArduinoIoTCloud.onPropertyValue(thingId, variableName, showUpdates = value => console.log(value)); }) .then(() => console.log("Callback registered")) @@ -81,7 +81,7 @@ Full examples and documentation can be found at: ### MicroPython -The [Arduino IoT Cloud Python Client](https://github.com/arduino/arduino-iot-cloud-py) can be installed on a board running MicroPython, and is designed to be easy to use. With just a few lines of code you can connect to the cloud, using credentials obtained during the manual device configuration. +The [Arduino Cloud Python Client](https://github.com/arduino/arduino-iot-cloud-py) can be installed on a board running MicroPython, and is designed to be easy to use. With just a few lines of code you can connect to the cloud, using credentials obtained during the manual device configuration. Below is a minimal example: @@ -97,17 +97,17 @@ client["variable"] = 255 client.start() ``` -For more information, visit the [Connecting to Arduino IoT Cloud using MicroPython](/arduino-cloud/getting-started/iot-cloud-micropython) guide. +For more information, visit the [Connecting to Arduino Cloud using MicroPython](/arduino-cloud/getting-started/iot-cloud-micropython) guide. ### Python -The [Arduino IoT Cloud Python Client](https://github.com/arduino/arduino-iot-cloud-py) can also be used with regular python, and is very similar to how you connect using MicroPython, with a few adjustments. +The [Arduino Cloud Python Client](https://github.com/arduino/arduino-iot-cloud-py) can also be used with regular python, and is very similar to how you connect using MicroPython, with a few adjustments. To find out more about how to connect using Python, you can refer to the Python section of the [Manual Device Configuration](/arduino-cloud/getting-started/manual-device#python) guide. ## Backward Compatibility Policy -Public Arduino IoT Cloud APIs are exposing versioned endpoints and are committed to preserving compatibility with the following policies in place: +Public Arduino Cloud APIs are exposing versioned endpoints and are committed to preserving compatibility with the following policies in place: - When making a breaking change to the API signature or behavior, we will expose a new version of the endpoint. - If we are making a change that is backward compatible with the existing version, we won't change the endpoint version. - When introducing a new version of the API, we will preserve the previous version as deprecated for a reasonable amount of time to allow client migrations. diff --git a/content/arduino-cloud/01.getting-started/08.arduino-iot-api/arduino-iot-api.md b/content/arduino-cloud/07.api/02.arduino-iot-api/arduino-iot-api.md similarity index 90% rename from content/arduino-cloud/01.getting-started/08.arduino-iot-api/arduino-iot-api.md rename to content/arduino-cloud/07.api/02.arduino-iot-api/arduino-iot-api.md index 954c80a9eb..db88a89f3e 100644 --- a/content/arduino-cloud/01.getting-started/08.arduino-iot-api/arduino-iot-api.md +++ b/content/arduino-cloud/07.api/02.arduino-iot-api/arduino-iot-api.md @@ -1,9 +1,8 @@ --- -title: 'Arduino Cloud REST API & SDK' -difficulty: advanced -description: 'Learn how to authenticate with the Arduino IoT Cloud REST API to make requests using HTTP Client, JavaScript and Python®.' +title: 'REST API & SDK' +description: 'Learn how to authenticate with the Arduino Cloud REST API to make requests using HTTP Client, JavaScript and Python®.' tags: - - IoT Cloud REST API + - Arduino Cloud REST API - JavaScript - Python® - node.js @@ -11,14 +10,14 @@ tags: author: 'Karl Söderby' --- -The [Arduino IoT Cloud REST API](https://www.arduino.cc/reference/en/iot/api/) can be accessed through a set of endpoints to manage **Devices, Things, Properties** and more. It can be accessed via any HTTP client, and is supported by JavaScript, Python® and Golang clients. +The [Arduino Cloud REST API](https://www.arduino.cc/reference/en/iot/api/) can be accessed through a set of endpoints to manage **Devices, Things, Properties** and more. It can be accessed via any HTTP client, and is supported by JavaScript, Python® and Golang clients. -In this article you will find some useful examples to get started with the Arduino IoT Cloud API, and an understanding of what the API offers. +In this article you will find some useful examples to get started with the Arduino Cloud API, and an understanding of what the API offers. To see the full API, follow the link below: -- [Arduino IoT Cloud API](https://www.arduino.cc/reference/en/iot/api/) +- [Arduino Cloud API](https://www.arduino.cc/reference/en/iot/api/) -***To authenticate with the Arduino IoT Cloud API, you will need to set up an [Arduino Account](https://cloud.arduino.cc/home/). How to generate API credentials will be explained in this article.*** +***To authenticate with the Arduino Cloud API, you will need to set up an [Arduino Account](https://cloud.arduino.cc/home/). How to generate API credentials will be explained in this article.*** ## Requirements @@ -56,7 +55,7 @@ To authenticate, you will need to generate a `clientId` and `clientSecret`. This ## Obtaining IDs -All main components of the Arduino IoT Cloud have an `id` associated. You can access your **device, Thing & variable** `id` from the web interface. +All main components of the Arduino Cloud have an `id` associated. You can access your **device, Thing & variable** `id` from the web interface. For example, your Thing ID is stored in the **"Metadata"** tab of your Thing. @@ -201,7 +200,7 @@ As this is a `json` object, we can access it by changing the following line from console.log(data[0].last_value); ``` -This is one of many examples of how to interact with the API. Now that you are setup, you can go on to explore the rest of the [Arduino IoT Cloud API](https://www.arduino.cc/reference/en/iot/api/). +This is one of many examples of how to interact with the API. Now that you are setup, you can go on to explore the rest of the [Arduino Cloud API](https://www.arduino.cc/reference/en/iot/api/). ## Python® @@ -395,5 +394,5 @@ See the full example on [GitHub](https://github.com/arduino/iot-client-go/tree/m ## Summary -This document covers the overall usage of the [Arduino IoT Cloud API](https://www.arduino.cc/reference/en/iot/api/), and how to use it with different clients (JavaScript, Python®, Golang). +This document covers the overall usage of the [Arduino Cloud API](https://www.arduino.cc/reference/en/iot/api/), and how to use it with different clients (JavaScript, Python®, Golang). diff --git a/content/arduino-cloud/01.getting-started/08.arduino-iot-api/assets/access-token.png b/content/arduino-cloud/07.api/02.arduino-iot-api/assets/access-token.png similarity index 100% rename from content/arduino-cloud/01.getting-started/08.arduino-iot-api/assets/access-token.png rename to content/arduino-cloud/07.api/02.arduino-iot-api/assets/access-token.png diff --git a/content/arduino-cloud/01.getting-started/08.arduino-iot-api/assets/api-keys.png b/content/arduino-cloud/07.api/02.arduino-iot-api/assets/api-keys.png similarity index 100% rename from content/arduino-cloud/01.getting-started/08.arduino-iot-api/assets/api-keys.png rename to content/arduino-cloud/07.api/02.arduino-iot-api/assets/api-keys.png diff --git a/content/arduino-cloud/01.getting-started/08.arduino-iot-api/assets/get-request.png b/content/arduino-cloud/07.api/02.arduino-iot-api/assets/get-request.png similarity index 100% rename from content/arduino-cloud/01.getting-started/08.arduino-iot-api/assets/get-request.png rename to content/arduino-cloud/07.api/02.arduino-iot-api/assets/get-request.png diff --git a/content/arduino-cloud/01.getting-started/08.arduino-iot-api/assets/postman-1.png b/content/arduino-cloud/07.api/02.arduino-iot-api/assets/postman-1.png similarity index 100% rename from content/arduino-cloud/01.getting-started/08.arduino-iot-api/assets/postman-1.png rename to content/arduino-cloud/07.api/02.arduino-iot-api/assets/postman-1.png diff --git a/content/arduino-cloud/01.getting-started/08.arduino-iot-api/assets/postman-2.png b/content/arduino-cloud/07.api/02.arduino-iot-api/assets/postman-2.png similarity index 100% rename from content/arduino-cloud/01.getting-started/08.arduino-iot-api/assets/postman-2.png rename to content/arduino-cloud/07.api/02.arduino-iot-api/assets/postman-2.png diff --git a/content/arduino-cloud/01.getting-started/08.arduino-iot-api/assets/thing-id.png b/content/arduino-cloud/07.api/02.arduino-iot-api/assets/thing-id.png similarity index 100% rename from content/arduino-cloud/01.getting-started/08.arduino-iot-api/assets/thing-id.png rename to content/arduino-cloud/07.api/02.arduino-iot-api/assets/thing-id.png diff --git a/content/arduino-cloud/01.getting-started/08.arduino-iot-api/hero-banner.png b/content/arduino-cloud/07.api/02.arduino-iot-api/hero-banner.png similarity index 100% rename from content/arduino-cloud/01.getting-started/08.arduino-iot-api/hero-banner.png rename to content/arduino-cloud/07.api/02.arduino-iot-api/hero-banner.png diff --git a/content/arduino-cloud/07.api/03.c-library/c-library.md b/content/arduino-cloud/07.api/03.c-library/c-library.md new file mode 100644 index 0000000000..28aa376041 --- /dev/null +++ b/content/arduino-cloud/07.api/03.c-library/c-library.md @@ -0,0 +1,85 @@ +--- +title: Arduino / C++ Library +description: The ArduinoIoTCloud library allows you to connect to the Arduino Cloud using Arduino/C++. +author: Karl Söderby +tags: [C++, Arduino] +--- + +The default Arduino / C++ library for the Arduino Cloud is the [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud) library. This library depends on the [Arduino_ConnectionHandler](https://github.com/arduino-libraries/Arduino_ConnectionHandler) library which provides connection via various wireless protocols (Wi-Fi®, LoRaWAN®, NB-IoT, GSM, Ethernet). + +The library is integrated into the Arduino Cloud platform, where [Automatic Sketch Generation](/arduino-cloud/cloud-interface/sketches#iot-sketches) converts your Thing configurations into a set files that relies on aforementioned libraries. + +The **ArduinoIoTCloud** library supports either connection via **TCP/IP** or **LoRaWAN®**. Depending on the device you compile for, the library automatically chooses the right configuration. + +## GitHub + +To view the source code and report issues, follow the links below to the GitHub repository: +- [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud/tree/master) + +## Connection Methods + +The ArduinoIoTCloud library supports both connection via TCP/IP and via LoRaWAN®, which is enabled via the `ArduinoIoTCloudTCP` and `ArduinoIoTCloudLPWAN` classes. Depending on what [device you configure](/arduino-cloud/hardware/devices), the library will automatically choose the right class, which will externally be available in your sketch file as `ArduinoCloud` class. + +### TCP / MQTT + +When connecting via [TCP/IP](https://en.wikipedia.org/wiki/Internet_protocol_suite) stack, the library communicates with the Arduino Cloud via [MQTT](https://en.wikipedia.org/wiki/MQTT), a lightweight network protocol using a publish/subscribe method to send data. This support is enabled in the following files: +- [ArduinoIoTCloudTCP.cpp](https://github.com/arduino-libraries/ArduinoIoTCloud/blob/master/src/ArduinoIoTCloudTCP.cpp) +- [ArduinoIoTCloudTCP.h](https://github.com/arduino-libraries/ArduinoIoTCloud/blob/master/src/ArduinoIoTCloudTCP.h) + +### LoRaWAN® + +When connecting via LoRaWAN®, data is sent via [The Things Network](https://www.thethingsnetwork.org/), which is integrated with the Arduino Cloud. This support is enabled in the following files: +- [ArduinoIoTCloudLPWAN.cpp](https://github.com/arduino-libraries/ArduinoIoTCloud/blob/master/src/ArduinoIoTCloudLPWAN.cpp) +- [ArduinoIoTCloudLPWAN.h](https://github.com/arduino-libraries/ArduinoIoTCloud/blob/master/src/ArduinoIoTCloudLPWAN.h) + +## Library API Docs + +The documentation lives in the [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud) library documentation page. Here you will find all public methods that are available. + +Most of its functions are already pre-configured in your sketch files, so for most use cases you will not need to explore the API. Functions for connecting to, and syncing data with the Arduino Cloud is handled automatically, and will be generated into your sketch files in the web environment. + +## Arduino IDE (Offline) + +This library can be used with the offline version of the Arduino IDE (download through the [Arduino Downloads Page](https://www.arduino.cc/en/software/)). You can program your devices offline and monitor them via the cloud, but your Thing configuration is not synchronized if you do so. + +To use it offline, you will manually need to install the following libraries in the Arduino IDE: +- [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud) +- [Arduino_ConnectionHandler](https://github.com/arduino-libraries/Arduino_ConnectionHandler) + +## Events & Callbacks + +Arduino Cloud has support for events and callbacks. This can be used to trigger specific functionalities depending on what state your device is in. + +You can for example trigger a specific block of code whenever the board is in a **connecting**, **synchronized** or **disconnected** state. In this document, we will explore how to set it up, using an example from the [ArduinoIoTCloud](https://github.com/arduino-libraries/ArduinoIoTCloud/blob/master/examples/ArduinoIoTCloud-Callbacks/ArduinoIoTCloud-Callbacks.ino) library. + +### Events + +The `ArduinoIoTCloudEvent` enumeration class has three possible events: +- `CONNECT` (0) - Board successfully connects to Arduino Cloud. +- `SYNC` (1) - Data is successfully synced between Board and Arduino Cloud. +- `DISCONNECT` (2) - Board has lost connection to Arduino Cloud. + +The `CONNECT` and `DISCONNECT` events can occur even though no variable is created inside the Thing. However, `SYNC` requires a variable to be created, as this triggers whenever data is synchronized between the board and cloud. + +These events can be subscribed to using the `addCallback()` function, which is documented in the next section. + +### Callbacks + +Callbacks can be added for each event, and essentially triggers a custom function whenever the event occurs. + +Callbacks are added via the `addCallback()` method from the `ArduinoIoTCloud` class, where the **event** and **custom function** are added as parameters. + +```arduino +ArduinoCloud.addCallback(ArduinoIoTCloudEvent::CONNECT, doThisOnConnect); +``` + +The above code will trigger the `doThisOnConnect()` +function whenever the `CONNECT` event occurs. + +***Please note that callback functions should be added inside the `setup()` of your sketch.*** + +### Full Example + +The example below demonstrates how to use events & callbacks in the Arduino Cloud. + + \ No newline at end of file diff --git a/content/arduino-cloud/07.api/04.python/assets/variable-sync.png b/content/arduino-cloud/07.api/04.python/assets/variable-sync.png new file mode 100644 index 0000000000..14a921098f Binary files /dev/null and b/content/arduino-cloud/07.api/04.python/assets/variable-sync.png differ diff --git a/content/arduino-cloud/07.api/04.python/python.md b/content/arduino-cloud/07.api/04.python/python.md new file mode 100644 index 0000000000..7fc62b3b47 --- /dev/null +++ b/content/arduino-cloud/07.api/04.python/python.md @@ -0,0 +1,45 @@ +--- +title: Python Client +description: The Python Client allows you to connect to the Arduino Cloud through Python. +author: Karl Söderby +tags: [Python, Arduino Cloud] +--- + +The Python Client for connecting to the Arduino Cloud is known as the [Arduino Cloud Python Client](https://github.com/arduino/arduino-iot-cloud-py) library. This library is implemented to support MicroPython, CircuitPython as well as regular Python running on your personal computer / Linux machine (like Raspberry Pi). + +Connection via this client is achieved by registering a [manual device](/arduino-cloud/hardware/devices#manual-devices), i.e. a virtual device that is not associated with an Arduino hardware board. This virtual device can connect through a simple username/password (Device ID, Secret Key) which is generated in the Arduino Cloud when configuring a device. + +## GitHub + +To view the source code and report issues, follow the links below to the GitHub repository: +- [Arduino Cloud Python Client](https://github.com/arduino/arduino-iot-cloud-py) + +## Installation + +You can install this client either directly on your board running **MicroPython**, or on any computer using **Python**. + +### MicroPython + +To install the client on a board running MicroPython, you can check out the [MicroPython Installation Guide](/arduino-cloud/guides/micropython). Options to directly download the library to the board via Wi-Fi® or via USB is available, using [mip](https://docs.micropython.org/en/latest/reference/packages.html). + +### Python + +You can install the client via `pip` by running the following command: + +``` +pip install arduino-iot-cloud +``` + +Project description, release history and more information about this package can be found [here](https://pypi.org/project/arduino-iot-cloud/). + +***Need help setting up? Check out the [Python Installation Guide](/arduino-cloud/guides/python), which has ready made examples that will help you get started.*** + +## Variable Synchronisation + +Variable synchronisation is a feature of the Arduino Cloud that allows you to synchronize any variables across any devices. This is done in the Arduino Cloud web interface when creating/editing variables. + +![Synchronizing Variables](assets/variable-sync.png) + +With this feature, you can very easily integrate your existing Python, MicroPython or JavaScript projects with your Arduino projects. + +***Read more in the [Variable Synchronisation](/arduino-cloud/cloud-interface/variables#variable-synchronisation) section.*** \ No newline at end of file diff --git a/content/arduino-cloud/07.api/05.javascript/javascript.md b/content/arduino-cloud/07.api/05.javascript/javascript.md new file mode 100644 index 0000000000..724f778b6f --- /dev/null +++ b/content/arduino-cloud/07.api/05.javascript/javascript.md @@ -0,0 +1,121 @@ +--- +title: JavaScript / Node.js Library +description: The JavaScript Library allows you to connect to the Arduino Cloud using Node.js. +author: Karl Söderby +tags: [JavaScript, Arduino Cloud] +--- + +This library provides interaction with the Arduino Cloud MQTT broker and can be used both from the browser and Node.js. + +Connection via this library is achieved by registering a [manual device](/arduino-cloud/hardware/devices#manual-devices), i.e. a virtual device that is not associated with an Arduino hardware board. This virtual device can connect through a simple username/password (Device ID, Secret Key) which is generated in the Arduino Cloud when configuring a device. + +This library requires a version of [Node.js](https://nodejs.org/en/download/current) to be installed on your machine. + +## GitHub + +To view the source code and report issues, follow the links below to the GitHub repository: +- [arduino-iot-js](https://github.com/arduino/arduino-iot-js) + +## Requirements + +- [Node.js](https://nodejs.org/en/download/current) + +## Installation + +You can install this library using either `npm` or `yarn`. + +- [arduino-iot-js (NPM)](https://www.npmjs.com/package/arduino-iot-js) +``` +$ npm install arduino-iot-js +``` + +- [arduino-iot-js (Yarn)](https://yarnpkg.com/package?q=arduino%20cloud&name=arduino-iot-js) +``` +$ yarn add arduino-iot-js +``` + +***Check out the [JavaScript Setup guide](/arduino-cloud/guides/javascript) for more information and a detailed step by step tutorial.*** + +## Connection Methods + +There are three available methods for connection: +- Using device credentials (recommended method). +- Using an API key (generated and listed at [Arduino Cloud API keys](app.arduino.cc/app-keys)). +- Using a [JWT token](https://jwt.io/) + +### Device Credentials + +[Device credentials](/arduino-cloud/hardware/devices#secret-key--device-id) is the easiest method. These credentials are generated when configuring a manual device in the Arduino Cloud, and works like a username/password. The example below uses device credentials: + +```js +//JavaScript code + +const { ArduinoIoTCloud } = require('arduino-iot-js'); + +(async () => { + const client = await ArduinoIoTCloud.connect({ + deviceId: 'YOUR_DEVICE_ID', + secretKey: 'YOUR_SECRET_KEY', + onDisconnect: (message) => console.error(message), + }); + + const value = 20; + let cloudVar = "test_value" + + client.sendProperty(cloudVar, value); + console.log(cloudVar, ":", value); + + client.onPropertyValue(cloudVar, (value) => console.log(cloudVar, ":", value)); +})(); +``` + +### API Key + +You can also connect using an API key generated from the [Arduino Cloud API Key Section](app.arduino.cc/api-keys), a method that is almost identical to Device Credentials, but where you also need to specify your Thing ID. This is available in the metadata section of your Thing. + +```js +import { ArduinoIoTCloud } from 'arduino-iot-js'; + +(async () => { + const client = await ArduinoIoTCloud.connect({ + clientId: 'YOUR_CLIENT_ID', + clientSecret: 'YOUR_CLIENT_SECRET', + onDisconnect: (message) => console.error(message), + }); + + // Send a value to a thing property + const value = 'some value'; + client.sendProperty('YOUR_THING_ID', 'YOUR_VARIABLE_NAME', value); + + // Listen to a thing property's changes + client.onPropertyValue('YOUR_THING_ID', 'ANOTHER_VARIABLE_NAME', (value) => console.log(value)); +})(); +``` + +### JSON Web Token (JWT) + +To connect using a JWT, you can use the script below: + +```js +import { ArduinoIoTCloud } from 'arduino-iot-js'; + +async function retrieveUserToken() { + // Retrieve JWT Token here +} + +(async () => { + const token = await retrieveUserToken(); + + const client = await ArduinoIoTCloud.connect({ + token, + onDisconnect: (message) => console.error(message), + }); + + // Send a value to a thing property + const value = 'some value'; + client.sendProperty('YOUR_THING_ID', 'YOUR_VARIABLE_NAME', value); + + // Listen to a thing property's changes + client.onPropertyValue('YOUR_THING_ID', 'ANOTHER_VARIABLE_NAME', (value) => console.log(value)); +})(); +``` \ No newline at end of file diff --git a/content/arduino-cloud/07.api/api.md b/content/arduino-cloud/07.api/api.md new file mode 100644 index 0000000000..3845448ca1 --- /dev/null +++ b/content/arduino-cloud/07.api/api.md @@ -0,0 +1,3 @@ +--- +title: API +--- \ No newline at end of file diff --git a/content/arduino-cloud/01.getting-started/07.arduino-cloud-cli/arduino-cloud-cli.md b/content/arduino-cloud/08.arduino-cloud-cli/07.getting-started/arduino-cloud-cli.md similarity index 92% rename from content/arduino-cloud/01.getting-started/07.arduino-cloud-cli/arduino-cloud-cli.md rename to content/arduino-cloud/08.arduino-cloud-cli/07.getting-started/arduino-cloud-cli.md index 744258ed69..23711c0384 100644 --- a/content/arduino-cloud/01.getting-started/07.arduino-cloud-cli/arduino-cloud-cli.md +++ b/content/arduino-cloud/08.arduino-cloud-cli/07.getting-started/arduino-cloud-cli.md @@ -3,7 +3,7 @@ title: 'Arduino Cloud CLI' difficulty: advanced description: 'Get started with the Arduino Cloud CLI, a tool for the automation and mass-deployment of devices.' tags: - - Arduino IoT Cloud + - Arduino Cloud - Arduino Cloud CLI - Automation - OTA @@ -12,7 +12,7 @@ author: 'Karl Söderby, Paolo Calao' ## Introduction -The [Arduino Cloud CLI](https://github.com/arduino/arduino-cloud-cli) is a tool developed to access features of the [Arduino IoT Cloud service](https://create.arduino.cc/iot/) from the terminal. +The [Arduino Cloud CLI](https://github.com/arduino/arduino-cloud-cli) is a tool developed to access features of the [Arduino Cloud service](app.arduino.cc) from the terminal. It can be used as an automation tool to: - Clone existing Things & Dashboards (by extracting its template). @@ -21,14 +21,14 @@ It can be used as an automation tool to: ### What is the Arduino Cloud CLI? -This tool was primarily designed to reduce time spent duplicating projects in the Arduino IoT Cloud. Working with the CLI allows you to quickly make 10+ copies of a Thing, or update sketches on 50+ boards simultaneously. +This tool was primarily designed to reduce time spent duplicating projects in the Arduino Cloud. Working with the CLI allows you to quickly make 10+ copies of a Thing, or update sketches on 50+ boards simultaneously. An example of a workflow using this tool can be: -1. Create your application using the Arduino IoT Cloud web interface. Here you can configure your device, create variables, enter network credentials, edit your sketch and deploy your first project. +1. Create your application using the Arduino Cloud web interface. Here you can configure your device, create variables, enter network credentials, edit your sketch and deploy your first project. 2. With the **Arduino Cloud CLI**, extract templates of Things and dashboards you want to replicate. 3. Provision a device with the `device create` command and setup a Thing and dashboard using the templates previously extracted. -4. Download the sketch related to the Thing you extracted, and upload it to the device you created. This can also be done via the Arduino IoT Cloud. +4. Download the sketch related to the Thing you extracted, and upload it to the device you created. This can also be done via the Arduino Cloud. 5. Whenever an update is required for a fleet of devices, you can use the OTA mass-upload tool to update all of your devices at once, without being connected to your computer. ![Performing mass upload.](assets/mass-upload.png) @@ -37,13 +37,13 @@ Let's for example say that you have created a "smart plug" setup, that includes With the Arduino Cloud CLI tool, you can not only automate the initial setup of these devices, but also be able to automate the maintenance sequence as well. -***If you are new to the Arduino Cloud as well, you can follow the [Getting Started guide](/arduino-cloud/getting-started/iot-cloud-getting-started).*** +***If you are new to the Arduino Cloud as well, you can follow the [Getting Started guide](/arduino-cloud/guides/overview).*** ## Requirements - [Arduino account](https://cloud.arduino.cc/home/). - [Arduino Cloud CLI](https://github.com/arduino/arduino-cloud-cli) installed. -- A [cloud compatible board](/arduino-cloud/getting-started/iot-cloud-getting-started#compatible-hardware)\* +- A [cloud compatible board](/arduino-cloud/guides/overview#compatible-hardware)\* ***\*This is needed only for certain commands, like OTA uploads.*** @@ -179,7 +179,7 @@ arduino-cloud-cli device delete --tags =,= ### List Devices -Devices currently present on Arduino IoT Cloud can be retrieved with: +Devices currently present on Arduino Cloud can be retrieved with: ``` arduino-cloud-cli device list @@ -211,7 +211,7 @@ arduino-cloud-cli device delete-tags --id --keys , - `arduino-cloud-cli things` -**Things** in the Arduino IoT Cloud is the virtual twin of your hardware device. In a Thing, you create variables, attach device and add network credentials. +**Things** in the Arduino Cloud is the virtual twin of your hardware device. In a Thing, you create variables, attach device and add network credentials. With `arduino-cloud-cli` you can: @@ -435,13 +435,13 @@ You can also compile a file through any version of the Arduino IDE (not online). The Arduino Cloud CLI is a tool that can primarily be used to extract a template from a single Thing or dashboard, and deploy it to several devices. It is also a tool for managing your fleet of devices, such as providing mass OTA uploads (such as firmware updates). -It is intended to be used as a supplementary tool for the [Arduino IoT Cloud](https://cloud.arduino.cc/home/) web interface, but can well be used as a standalone tool to manage your devices, Things properties and dashboards. +It is intended to be used as a supplementary tool for the [Arduino Cloud](https://cloud.arduino.cc/home/) web interface, but can well be used as a standalone tool to manage your devices, Things properties and dashboards. The Arduino Cloud CLI can also be well combined with the [Arduino CLI](https://arduino.github.io/arduino-cli), a separate tool that brings the functionality of the Arduino IDE to your choice of terminal. To recap, this tool can be used to: -- Extract templates from your existing Things & dashboards previously created in the Arduino IoT Cloud. -- Perform the same actions as the Arduino IoT Cloud but from a terminal (like creating/deleting devices, Things and linking them). +- Extract templates from your existing Things & dashboards previously created in the Arduino Cloud. +- Perform the same actions as the Arduino Cloud but from a terminal (like creating/deleting devices, Things and linking them). - List all available components from the cloud (like `thing list`). - Tag your devices & Things with the `--tags =` command. diff --git a/content/arduino-cloud/01.getting-started/07.arduino-cloud-cli/assets/export-ide.png b/content/arduino-cloud/08.arduino-cloud-cli/07.getting-started/assets/export-ide.png similarity index 100% rename from content/arduino-cloud/01.getting-started/07.arduino-cloud-cli/assets/export-ide.png rename to content/arduino-cloud/08.arduino-cloud-cli/07.getting-started/assets/export-ide.png diff --git a/content/arduino-cloud/01.getting-started/07.arduino-cloud-cli/assets/mass-upload.png b/content/arduino-cloud/08.arduino-cloud-cli/07.getting-started/assets/mass-upload.png similarity index 100% rename from content/arduino-cloud/01.getting-started/07.arduino-cloud-cli/assets/mass-upload.png rename to content/arduino-cloud/08.arduino-cloud-cli/07.getting-started/assets/mass-upload.png diff --git a/content/arduino-cloud/08.arduino-cloud-cli/arduino-cloud-cli.md b/content/arduino-cloud/08.arduino-cloud-cli/arduino-cloud-cli.md new file mode 100644 index 0000000000..d5aee35833 --- /dev/null +++ b/content/arduino-cloud/08.arduino-cloud-cli/arduino-cloud-cli.md @@ -0,0 +1,3 @@ +--- +title: Arduino Cloud CLI +--- \ No newline at end of file diff --git a/content/arduino-cloud/02.features/00.security-considerations/assets/device-phases.png b/content/arduino-cloud/09.business/00.security-considerations/assets/device-phases.png similarity index 100% rename from content/arduino-cloud/02.features/00.security-considerations/assets/device-phases.png rename to content/arduino-cloud/09.business/00.security-considerations/assets/device-phases.png diff --git a/content/arduino-cloud/02.features/00.security-considerations/security-considerations.md b/content/arduino-cloud/09.business/00.security-considerations/security-considerations.md similarity index 97% rename from content/arduino-cloud/02.features/00.security-considerations/security-considerations.md rename to content/arduino-cloud/09.business/00.security-considerations/security-considerations.md index 958b4ea1cd..c812a1e279 100644 --- a/content/arduino-cloud/02.features/00.security-considerations/security-considerations.md +++ b/content/arduino-cloud/09.business/00.security-considerations/security-considerations.md @@ -130,13 +130,13 @@ The Arduino Web Editor allows customers to create sketches they can subsequently The Arduino Web Editor also provides a secret tab that can be used to securely store sensitive information needed by the device (e.g. Wi-Fi® credentials, API credentials). Secrets in this tab are encrypted with the AES-256 algorithm to safely store them in the Cloud. In order to communicate with the Arduino Web Editor, web browsers should be able to communicate over the internet to port 80, 443 and 8080 towards Arduino’s subdomains \*.arduino.cc. -### Arduino IoT Cloud +### Arduino Cloud -The Arduino IoT Cloud collects MQTT events through a data pipeline which is accessible only by the owner of the data and access authorization is enforced via our backend API. +The Arduino Cloud collects MQTT events through a data pipeline which is accessible only by the owner of the data and access authorization is enforced via our backend API. ### Arduino Cloud CLI -The Arduino Cloud CLI provides a way for interacting with the Arduino IoT Cloud via the command line. The communication is carried out via an HTTPS connection and authentication is performed via API key credentials stored on the local machine. +The Arduino Cloud CLI provides a way for interacting with the Arduino Cloud via the command line. The communication is carried out via an HTTPS connection and authentication is performed via API key credentials stored on the local machine. ### Arduino Create Agent @@ -155,7 +155,7 @@ Devices onboarding and communication with the Arduino Cloud is ensured to protec > **Note**: this communication process is available only on devices equipped with a secure element chip. **Device setup phase**: -* The setup phase is initiated by the web browser with a secure connection to the Arduino IoT Cloud over HTTPS requesting to create a new device. +* The setup phase is initiated by the web browser with a secure connection to the Arduino Cloud over HTTPS requesting to create a new device. * The IoT Cloud provides a special sketch that is run on the device to generate: * a private and public keys; * a Certificate Signing Request (CSR). diff --git a/content/arduino-cloud/02.features/01.iso27001/assets/ISOIEC-27001.pdf b/content/arduino-cloud/09.business/01.iso27001/assets/ISOIEC-27001.pdf similarity index 100% rename from content/arduino-cloud/02.features/01.iso27001/assets/ISOIEC-27001.pdf rename to content/arduino-cloud/09.business/01.iso27001/assets/ISOIEC-27001.pdf diff --git a/content/arduino-cloud/02.features/01.iso27001/assets/infosec.png b/content/arduino-cloud/09.business/01.iso27001/assets/infosec.png similarity index 100% rename from content/arduino-cloud/02.features/01.iso27001/assets/infosec.png rename to content/arduino-cloud/09.business/01.iso27001/assets/infosec.png diff --git a/content/arduino-cloud/02.features/01.iso27001/iso27001.md b/content/arduino-cloud/09.business/01.iso27001/iso27001.md similarity index 100% rename from content/arduino-cloud/02.features/01.iso27001/iso27001.md rename to content/arduino-cloud/09.business/01.iso27001/iso27001.md diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/add-on-selection.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/add-on-selection.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/add-on-selection.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/add-on-selection.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/add-tag.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/add-tag.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/add-tag.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/add-tag.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/arduino-account-login.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/arduino-account-login.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/arduino-account-login.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/arduino-account-login.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/cloud-add-on.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/cloud-add-on.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/cloud-add-on.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/cloud-add-on.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/create-new-space.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/create-new-space.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/create-new-space.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/create-new-space.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/create-thing.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/create-thing.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/create-thing.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/create-thing.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/dashboard-example.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/dashboard-example.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/dashboard-example.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/dashboard-example.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/dashboard-sharing.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/dashboard-sharing.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/dashboard-sharing.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/dashboard-sharing.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/device-name-configuration.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/device-name-configuration.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/device-name-configuration.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/device-name-configuration.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/device-onboarding.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/device-onboarding.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/device-onboarding.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/device-onboarding.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/devices-list.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/devices-list.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/devices-list.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/devices-list.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/download-button.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/download-button.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/download-button.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/download-button.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/download-data.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/download-data.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/download-data.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/download-data.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/email-data.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/email-data.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/email-data.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/email-data.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/get-data.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/get-data.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/get-data.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/get-data.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/iot-cloud-button.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/iot-cloud-button.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/iot-cloud-button.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/iot-cloud-button.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/members-home.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/members-home.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/members-home.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/members-home.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/new-member-invitation.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/new-member-invitation.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/new-member-invitation.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/new-member-invitation.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/new-tag-filtering.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/new-tag-filtering.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/new-tag-filtering.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/new-tag-filtering.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/plan-customization.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/plan-customization.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/plan-customization.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/plan-customization.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/portenta-found.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/portenta-found.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/portenta-found.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/portenta-found.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/provisioning-success.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/provisioning-success.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/provisioning-success.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/provisioning-success.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/search-things.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/search-things.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/search-things.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/search-things.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/shared-space-settings.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/shared-space-settings.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/shared-space-settings.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/shared-space-settings.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/shared-space-type-selection.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/shared-space-type-selection.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/shared-space-type-selection.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/shared-space-type-selection.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/switch-spaces.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/switch-spaces.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/switch-spaces.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/switch-spaces.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/thing-metadata.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/thing-metadata.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/thing-metadata.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/thing-metadata.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/web-editor-button.png b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/web-editor-button.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/assets/web-editor-button.png rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/assets/web-editor-button.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/contend.md b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/contend.md similarity index 88% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/contend.md rename to content/arduino-cloud/09.business/09.arduino-cloud-for-business/contend.md index 34da56b0fd..4aa2426a11 100644 --- a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-business/contend.md +++ b/content/arduino-cloud/09.business/09.arduino-cloud-for-business/contend.md @@ -4,7 +4,7 @@ title: 'Getting started with Arduino Cloud for Business' description: 'Get a general overview of Arduino Cloud for Business and its features' difficulty: intermediate tags: - - IoT Cloud + - Arduino Cloud - Fleet Management - RBAC author: 'Marta Barbero' @@ -15,15 +15,14 @@ software: ## Overview -The [Arduino Cloud for Business](https://www.arduino.cc/pro/software-arduino-iot-cloud/) is an Arduino IoT Cloud plan dedicated to companies and industrial clients wanting enhanced features in terms of device management, Role-Based Access Control (RBAC), fleet management, and safe remote access. +The [Arduino Cloud for Business](https://www.arduino.cc/pro/software-arduino-iot-cloud/) is an Arduino Cloud plan dedicated to companies and industrial clients wanting enhanced features in terms of device management, Role-Based Access Control (RBAC), fleet management, and safe remote access. In this article, you will get a general overview of the major features of the Arduino Cloud for Business. -If you are not familiar with Arduino IoT Cloud, we strongly recommend you to take a look at the following documentation: +If you are not familiar with Arduino Cloud, we strongly recommend you to take a look at the following documentation: -* To find all tutorials & articles, visit the [Arduino IoT Cloud Documentation page](https://docs.arduino.cc/cloud/iot-cloud). -* For a technical overview, list of features, and API guide, visit the [Arduino IoT Cloud Cheat Sheet](https://docs.arduino.cc/cloud/iot-cloud/tutorials/technical-reference). -* For API & SDK Documentation, visit the developer reference at [Arduino IoT Cloud API](https://www.arduino.cc/reference/en/iot/api/). +* To find all tutorials & articles, visit the [Arduino Cloud Documentation page](https://docs.arduino.cc/cloud/iot-cloud). +* For API & SDK Documentation, visit the developer reference at [Arduino Cloud API](https://www.arduino.cc/reference/en/iot/api/). ## Goals @@ -70,7 +69,7 @@ Once your plan has been successfully activated, you will be asked to define the Your Arduino Cloud for Business plan comes with two spaces by default: -* **My Cloud**. My Cloud is an automatically created private space once the Arduino Cloud for Business plan is purchased. You can use this space for personal projects you do not want to share with all your team. This space is free and includes two Things, unlimited dashboards, and 100MB of Sketch storage by default, but it can be further extended and customized within *My plans* settings. Have a look at the [Arduino IT Cloud Getting Started](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started) if you would like to start using your private space. +* **My Cloud**. My Cloud is an automatically created private space once the Arduino Cloud for Business plan is purchased. You can use this space for personal projects you do not want to share with all your team. This space is free and includes two Things, unlimited dashboards, and 100MB of Sketch storage by default, but it can be further extended and customized within *My plans* settings. Have a look at the [Arduino IT Cloud Getting Started](https://docs.arduino.cc/arduino-cloud/guides/overview) if you would like to start using your private space. * **Shared Space**. A *Shared Space* is a company space you can use with all your team. It can have any number of members, who can all access the resources within its space. The access level and specific permissions can be customized by the *Space Admin* (see [Invite members into your space section](#invite-members-into-your-space) to learn more). In the next sections, you will learn more about Shared Space features and functionalities. @@ -163,24 +162,24 @@ The Arduino Cloud for Business allows for device management with Over-The-Air up The Arduino Cloud for Business is compatible with multiple Arduino boards or devices based on the ESP32 / ESP8266 microcontrollers. The Arduino Cloud currently supports devices connected via Wi-Fi®, Ethernet, LoRaWAN® (via The Things Network), and cellular connectivity. -To check the full list of compatible Hardware, have a look at [this tutorial](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started). +To check the full list of compatible Hardware, have a look at [this tutorial](https://docs.arduino.cc/arduino-cloud/guides/overview). ### Device Provisioning Arduino Cloud allows you to securely provision your devices through two different tools: -* **Arduino IoT Cloud.** Arduino IoT Cloud is an App integrated into your Arduino Cloud Space, guaranteeing straightforward provisioning of Arduino or other Cloud-compatible devices. It is provided with a dedicated User Interface which will guide you step-by-step during the onboarding process. This is a great choice in case you need to provision a few devices or you are not an advanced user. -* **Arduino Cloud CLI.** As explained in [this section](#arduino-cloud-cli), Arduino has developed a command line tool enabling the access of all Arduino IoT Cloud features from a terminal window. Arduino Cloud CLI is the right choice when you need to provision multiple devices at the same time and you are an advanced user. +* **Arduino Cloud.** Arduino Cloud is an App integrated into your Arduino Cloud Space, guaranteeing straightforward provisioning of Arduino or other Cloud-compatible devices. It is provided with a dedicated User Interface which will guide you step-by-step during the onboarding process. This is a great choice in case you need to provision a few devices or you are not an advanced user. +* **Arduino Cloud CLI.** As explained in [this section](#arduino-cloud-cli), Arduino has developed a command line tool enabling the access of all Arduino Cloud features from a terminal window. Arduino Cloud CLI is the right choice when you need to provision multiple devices at the same time and you are an advanced user. -#### Device Provisioning With Arduino IoT Cloud +#### Device Provisioning With Arduino Cloud If your device is compatible with Arduino Cloud, you can start provisioning it into your Shared Space by connecting it to your computer through a USB cable. -In addition, Arduino IoT Cloud requires your computer to have the [Arduino Create Agent installed](https://create.arduino.cc/getting-started/plugin/welcome). +In addition, Arduino Cloud requires your computer to have the [Arduino Create Agent installed](https://create.arduino.cc/getting-started/plugin/welcome). -When you are all set up correctly, you can click on **Arduino IoT Cloud** button in your Shared Space. +When you are all set up correctly, you can click on **Arduino Cloud** button in your Shared Space. -![Arduino IoT Cloud button](assets/iot-cloud-button.png "Arduino IoT Cloud button") +![Arduino Cloud button](assets/iot-cloud-button.png "Arduino Cloud button") Go to the **Devices** tab, click on **Add** and decide which type of device you would like to onboard. In this case, a Portenta H7 board will be used. @@ -204,9 +203,9 @@ If the onboarding proceeds as expected, the following page will appear confirmin You can now check its status under the Devices section. This section displays the name, status, and linked Things for each of the configured devices. Clicking on the device allows for renaming it, as well as accessing more information about the device, such as its ID number, type, FQBN, serial number, firmware version, linked Thing, latest activity, and the date when the device was added. -The device status indicates whether it is connected to the Arduino IoT Cloud (online), or not connected (offline). +The device status indicates whether it is connected to the Arduino Cloud (online), or not connected (offline). -![List of devices in your Arduino IoT Cloud](assets/devices-list.png "List of devices in your Arduino IoT Cloud") +![List of devices in your Arduino Cloud](assets/devices-list.png "List of devices in your Arduino Cloud") #### Device Provisioning With Arduino Cloud CLI @@ -224,7 +223,7 @@ To create a Thing, click on **Create Thing** next to the device of your interest ![Create a new Thing](assets/create-thing.png "Create a new Thing") -***If you want to understand how to work with your Things, check the dedicated documentation available [here](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started#3-creating-a-thing).*** +***If you want to understand how to work with your Things, check the dedicated documentation available [here](https://docs.arduino.cc/arduino-cloud/guides/overview#3-creating-a-thing).*** ***Do you want to learn more about the different types of Variables and their features? Have a look at [this tutorial](https://docs.arduino.cc/arduino-cloud/getting-started/cloud-variables).*** @@ -258,7 +257,7 @@ Arduino Cloud for Business integrates an amazing feature: Over-The-Air updates. Now it is time for you to start managing your fleet of devices/Things. The Arduino Cloud for Business fleet management features allow you to filter your devices/Things by status, add tags to more efficiently identify your projects, search between boards, and list and order them. -Get started with this awesome feature by going to **Things** or **Devices** tab in [Arduino IoT Cloud](https://create.arduino.cc/iot/devices) and start searching and filtering among your Things/devices. +Get started with this awesome feature by going to **Things** or **Devices** tab in [Arduino Cloud](app.arduino.cc/devices) and start searching and filtering among your Things/devices. ![Search and filter among devices](assets/search-things.png "Search and filter among devices") @@ -283,7 +282,7 @@ At this point, you can go back to the Things tab and start filtering your Things With Arduino Cloud for Business, you can create an unlimited number of dashboards. Push button, Switch, Scheduler, Map, Chart… These are just a few of the many widgets you can customize to visualize all your data or to remotely control your devices. -To start creating your dashboard, go to the **Dashboards** tab in [Arduino IoT Cloud](https://create.arduino.cc/iot/dashboards) and select the Thing you want to create a dashboard for. +To start creating your dashboard, go to the **Dashboards** tab in [Arduino Cloud](app.arduino.cc/dashboards) and select the Thing you want to create a dashboard for. ![Dashboard example](assets/dashboard-example.png "Dashboard example") @@ -299,11 +298,11 @@ Whether it is your teammate, your customer, or your system integrator; you can f ### Data Export -Arduino Cloud for Business allows any user to download historical data from Arduino IoT Cloud Things and Variables. The data are downloaded in **.csv** format to be ready for further evaluation or manipulation. +Arduino Cloud for Business allows any user to download historical data from Arduino Cloud Things and Variables. The data are downloaded in **.csv** format to be ready for further evaluation or manipulation. The Arduino Cloud for Business plan includes 1-year of data retention by default; this means that your data will be available and downloadable from your Arduino Cloud account for 1 year. -To start exporting your data locally, navigate into one of your dashboards on the [Arduino IoT Cloud](https://create.arduino.cc/iot/dashboards). While inside a dashboard, press the Download icon in the upper right corner. This will open a new window that will allow you to select which historical data you would like to download. +To start exporting your data locally, navigate into one of your dashboards on the [Arduino Cloud](app.arduino.cc/dashboards). While inside a dashboard, press the Download icon in the upper right corner. This will open a new window that will allow you to select which historical data you would like to download. ![Download icon](assets/download-button.png "Download icon") @@ -325,7 +324,7 @@ You are now ready to monitor and manipulate all your Cloud data. ## Arduino Cloud API -Use Arduino IoT Cloud back-end to control Things and devices via Arduino rest APIs in [Javascript](https://www.npmjs.com/package/@arduino/arduino-iot-client), [Python](https://pypi.org/project/arduino-iot-client/), or [Go](https://github.com/arduino/iot-client-go). With Arduino rest APIs, you will be able to manage up to 10 requests per second, guaranteeing stable data sharing. +Use Arduino Cloud back-end to control Things and devices via Arduino rest APIs in [Javascript](https://www.npmjs.com/package/@arduino/arduino-iot-client), [Python](https://pypi.org/project/arduino-iot-client/), or [Go](https://github.com/arduino/iot-client-go). With Arduino rest APIs, you will be able to manage up to 10 requests per second, guaranteeing stable data sharing. Leveraging the APIs, you can interact with any element of the Cloud: data, devices, dashboards, and web properties. At the same time, APIs allow you to add power to the script, create complex scenarios or send and receive data from your custom service, 3rd party solution, or mobile application. @@ -335,7 +334,7 @@ To use the APIs, you need to create an API Key Token in the API Keys section of ***If you want to start creating your own API Keys Token, take a look at [this tutorial](https://docs.arduino.cc/arduino-cloud/getting-started/arduino-iot-api) and [this documentation](https://www.arduino.cc/reference/en/iot/api/).*** -## IoT Cloud App +## IoT Remote App Monitor your dashboards anywhere, anytime, and use your dashboards on the go with the free IoT Remote App. @@ -384,7 +383,7 @@ Build and train professional-grade predictive models with just a few lines of co ## Additional Tutorials -You can find more tutorials on the [Arduino IoT Cloud documentation page](https://docs.arduino.cc/arduino-cloud/). +You can find more tutorials on the [Arduino Cloud documentation page](https://docs.arduino.cc/arduino-cloud/). ## Congratulations diff --git a/content/arduino-cloud/09.business/business.md b/content/arduino-cloud/09.business/business.md new file mode 100644 index 0000000000..b0be886f6e --- /dev/null +++ b/content/arduino-cloud/09.business/business.md @@ -0,0 +1,3 @@ +--- +title: Cloud Business +--- \ No newline at end of file diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/add-billing-information.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/add-billing-information.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/add-billing-information.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/add-billing-information.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/add-members.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/add-members.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/add-members.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/add-members.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/add-tag.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/add-tag.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/add-tag.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/add-tag.png diff --git a/content/arduino-cloud/02.features/09.advanced-chart/assets/advanced-chart.gif b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/advanced-chart.gif similarity index 100% rename from content/arduino-cloud/02.features/09.advanced-chart/assets/advanced-chart.gif rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/advanced-chart.gif diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/api-keys.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/api-keys.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/api-keys.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/api-keys.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/arduino-account-login.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/arduino-account-login.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/arduino-account-login.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/arduino-account-login.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/available_triggers.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/available_triggers.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/available_triggers.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/available_triggers.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/cloud-home.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/cloud-home.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/cloud-home.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/cloud-home.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/configure-your-plan.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/configure-your-plan.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/configure-your-plan.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/configure-your-plan.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/congratulations-setup.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/congratulations-setup.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/congratulations-setup.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/congratulations-setup.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/content.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/content.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/content.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/content.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/copy-code-join.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/copy-code-join.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/copy-code-join.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/copy-code-join.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/create-a-thing.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/create-a-thing.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/create-a-thing.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/create-a-thing.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/create-thing.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/create-thing.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/create-thing.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/create-thing.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/dashboard-example.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/dashboard-example.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/dashboard-example.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/dashboard-example.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/dashboard-sharing.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/dashboard-sharing.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/dashboard-sharing.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/dashboard-sharing.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/device-name-configuration.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/device-name-configuration.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/device-name-configuration.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/device-name-configuration.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/device-onboarding.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/device-onboarding.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/device-onboarding.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/device-onboarding.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/devices-list.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/devices-list.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/devices-list.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/devices-list.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/download-button.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/download-button.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/download-button.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/download-button.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/download-data.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/download-data.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/download-data.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/download-data.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/edu-tutorial-thing-overview.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/edu-tutorial-thing-overview.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/edu-tutorial-thing-overview.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/edu-tutorial-thing-overview.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/email-data.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/email-data.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/email-data.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/email-data.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/features-usage.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/features-usage.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/features-usage.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/features-usage.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/fillschoolinfo.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/fillschoolinfo.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/fillschoolinfo.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/fillschoolinfo.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/get-data.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/get-data.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/get-data.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/get-data.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/google-classroom-content-share.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/google-classroom-content-share.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/google-classroom-content-share.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/google-classroom-content-share.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/google-integration-arduino-cloud02.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/google-integration-arduino-cloud02.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/google-integration-arduino-cloud02.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/google-integration-arduino-cloud02.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/gs-thing-editor.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/gs-thing-editor.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/gs-thing-editor.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/gs-thing-editor.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/iot-cloud-button.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/iot-cloud-button.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/iot-cloud-button.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/iot-cloud-button.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/join-space-highlight.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/join-space-highlight.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/join-space-highlight.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/join-space-highlight.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/leftsidebar.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/leftsidebar.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/leftsidebar.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/leftsidebar.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/members-home.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/members-home.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/members-home.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/members-home.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/my-cloud-space.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/my-cloud-space.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/my-cloud-space.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/my-cloud-space.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/my-school-share.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/my-school-share.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/my-school-share.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/my-school-share.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/name-device.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/name-device.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/name-device.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/name-device.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/new-tag-filtering.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/new-tag-filtering.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/new-tag-filtering.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/new-tag-filtering.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/portenta-found.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/portenta-found.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/portenta-found.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/portenta-found.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/provisioning-success.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/provisioning-success.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/provisioning-success.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/provisioning-success.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/school-plan.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/school-plan.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/school-plan.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/school-plan.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/search-things.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/search-things.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/search-things.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/search-things.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/setup-cloud-board.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/setup-cloud-board.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/setup-cloud-board.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/setup-cloud-board.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/shared-space-settings.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/shared-space-settings.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/shared-space-settings.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/shared-space-settings.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/shared-space-type-selection.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/shared-space-type-selection.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/shared-space-type-selection.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/shared-space-type-selection.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/thing-metadata.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/thing-metadata.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/thing-metadata.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/thing-metadata.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/thing-overview.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/thing-overview.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/thing-overview.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/thing-overview.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/triggersfree-plan.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/triggersfree-plan.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/triggersfree-plan.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/triggersfree-plan.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/user-roles.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/user-roles.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/user-roles.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/user-roles.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/variable.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/variable.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/variable.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/variable.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/web-editor-button.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/web-editor-button.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/web-editor-button.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/web-editor-button.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/widget.png b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/widget.png similarity index 100% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/assets/widget.png rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/assets/widget.png diff --git a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/content.md b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/content.md similarity index 95% rename from content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/content.md rename to content/arduino-cloud/10.education/09.arduino-cloud-for-education/content.md index 5b61511e16..b237f17811 100644 --- a/content/arduino-cloud/01.getting-started/09.arduino-cloud-for-education/content.md +++ b/content/arduino-cloud/10.education/09.arduino-cloud-for-education/content.md @@ -200,7 +200,7 @@ Arduino IoT Cloud is an easy-to-use Internet of Things application platform. Ard In your IoT projects with Arduino you will need **three elements**: -1. The [**Arduino IoT Cloud**](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started) +1. The [**Arduino IoT Cloud**](https://docs.arduino.cc/arduino-cloud/guides/overview) 2. The [**Arduino Create Agent**](https://create.arduino.cc/getting-started/plugin/welcome) the middle man between Arduino’s Web Editor, Arduino IoT Cloud and your computer. It allows you to use the browser to edit and deploy sketches to your Arduino board. 3. **A device** of your choice. @@ -234,13 +234,13 @@ The device status indicates whether it is connected to the Arduino IoT Cloud (on ### Link A Thing To Your Device -To use a device in IoT Cloud, you need to [create a Thing](https://create.arduino.cc/iot/things), or associate it to an existing Thing. A Thing is the digital twin of your device, like a reference to the actual hardware used to implement them. Each Thing is represented by a collection of properties, the configuration of some variables and other settings, as well as the history of the data collected for those variables. +To use a device in IoT Cloud, you need to [create a Thing](app.arduino.cc/things), or associate it to an existing Thing. A Thing is the digital twin of your device, like a reference to the actual hardware used to implement them. Each Thing is represented by a collection of properties, the configuration of some variables and other settings, as well as the history of the data collected for those variables. To create a Thing, click on **Create Thing** next to the device of your interest, and your Thing will be automatically created for you. ![Create a thing from device tab](assets/create-a-thing.png "Create Thing button") -If you want to explore more on how Things work, check [here](https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started#3-creating-a-thing). +If you want to explore more on how Things work, check [here](https://docs.arduino.cc/arduino-cloud/guides/overview#3-creating-a-thing). ***With a Free Plan you can only connect two Things with the IoT Cloud at a time. With a School Plan, each member you've included in your plan can connect up to five Things to a Device.*** @@ -257,7 +257,7 @@ The image below highlights the important elements that we will use frequently. E ### Filter your Things or Devices -You can search and filter among your Things/Devices by going to **Things** or **Devices** tab in [Arduino IoT Cloud](https://create.arduino.cc/iot/devices). +You can search and filter among your Things/Devices by going to **Things** or **Devices** tab in [Arduino IoT Cloud](app.arduino.cc/devices). ![Search and filter among devices](assets/search-things.png) @@ -309,7 +309,7 @@ Arduino Cloud, both with *Free* or *School Plan*, allows any user to download hi ***The Arduino Cloud Free Plan allows only 1 day of data retention by default. The Arduino Cloud for School Plan includes 6 months of data retention by default; this means that your data will be available and downloadable from your Arduino Cloud account for 6 months.*** -To start exporting your data locally, navigate into one of your dashboards on the [Arduino IoT Cloud](https://create.arduino.cc/iot/dashboards). While inside a dashboard, press the **Download** icon in the upper right corner. This will open a new window that will allow you to select which historical data you would like to download. +To start exporting your data locally, navigate into one of your dashboards on the [Arduino IoT Cloud](app.arduino.cc/dashboards). While inside a dashboard, press the **Download** icon in the upper right corner. This will open a new window that will allow you to select which historical data you would like to download. ![Download icon](assets/download-button.png) @@ -361,7 +361,7 @@ Congratulations! Now you own a *School Plan* linked to your Arduino account. You ### Sharing Dashboards -With a *School Plan* is possible to share any Dashboard with anyone. Go to the [Dashboard](https://create.arduino.cc/iot/dashboards) tab in Arduino IoT Cloud, click on the three dots on the Dashboard you would like to share. +With a *School Plan* is possible to share any Dashboard with anyone. Go to the [Dashboard](app.arduino.cc/dashboards) tab in Arduino IoT Cloud, click on the three dots on the Dashboard you would like to share. As shown in the image below you can either send it directly to the user's *email* or *username*, or *share the link* with your class. diff --git a/content/arduino-cloud/10.education/education.md b/content/arduino-cloud/10.education/education.md new file mode 100644 index 0000000000..af71d9fa7c --- /dev/null +++ b/content/arduino-cloud/10.education/education.md @@ -0,0 +1,3 @@ +--- +title: Cloud Education +--- \ No newline at end of file diff --git a/content/arduino-cloud/11.application-notes/application-notes.md b/content/arduino-cloud/11.application-notes/application-notes.md new file mode 100644 index 0000000000..d6a2c22515 --- /dev/null +++ b/content/arduino-cloud/11.application-notes/application-notes.md @@ -0,0 +1,3 @@ +--- +title: Application Notes +--- \ No newline at end of file diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG01.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG01.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG01.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG01.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG02.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG02.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG02.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG02.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG03.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG03.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG03.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG03.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG04.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG04.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG04.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG04.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG05.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG05.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG05.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG05.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG06.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG06.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG06.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG06.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG07.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG07.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG07.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG07.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG08.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG08.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG08.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG08.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG09.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG09.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG09.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG09.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG10.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG10.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/IoT_ENV_IMG10.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/IoT_ENV_IMG10.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/MKRENV_T1_IMG01.5.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/MKRENV_T1_IMG01.5.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/MKRENV_T1_IMG01.5.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/MKRENV_T1_IMG01.5.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/associate_device.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/associate_device.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/associate_device.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/associate_device.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/dashboard_edit_blank.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/dashboard_edit_blank.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/dashboard_edit_blank.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/dashboard_edit_blank.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/device_overview.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/device_overview.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/device_overview.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/device_overview.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/device_setup_1.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/device_setup_1.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/device_setup_1.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/device_setup_1.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/device_setup_2.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/device_setup_2.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/device_setup_2.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/device_setup_2.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/device_setup_3.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/device_setup_3.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/device_setup_3.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/device_setup_3.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/device_setup_4.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/device_setup_4.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/device_setup_4.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/device_setup_4.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/new_dashboard.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/new_dashboard.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/new_dashboard.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/new_dashboard.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/new_device.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/new_device.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/new_device.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/new_device.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/new_thing.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/new_thing.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/new_thing.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/new_thing.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/thing_overview.png b/content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/thing_overview.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/assets/thing_overview.png rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/assets/thing_overview.png diff --git a/content/arduino-cloud/03.tutorials/cloud-environmental-data/cloud-environmental-data.md b/content/arduino-cloud/11.application-notes/cloud-environmental-data/cloud-environmental-data.md similarity index 83% rename from content/arduino-cloud/03.tutorials/cloud-environmental-data/cloud-environmental-data.md rename to content/arduino-cloud/11.application-notes/cloud-environmental-data/cloud-environmental-data.md index d6b26301aa..6de4980e29 100644 --- a/content/arduino-cloud/03.tutorials/cloud-environmental-data/cloud-environmental-data.md +++ b/content/arduino-cloud/11.application-notes/cloud-environmental-data/cloud-environmental-data.md @@ -1,8 +1,8 @@ --- -title: 'Environmental data in the Arduino IoT Cloud' +title: 'Environmental data in the Arduino Cloud' compatible-products: [mkr-wifi-1010, mkr-env-shield] difficulty: beginner -description: 'Learn how to collect environmental data from the MKR ENV Shield and display it in the Arduino IoT Cloud.' +description: 'Learn how to collect environmental data from the MKR ENV Shield and display it in the Arduino Cloud.' tags: - Environmental data - Sensors @@ -12,7 +12,7 @@ featuredImage: 'cloud' ## Introduction -In this tutorial, we will combine the functionality of the [MKR WiFi 1010](https://store.arduino.cc/mkr-wifi-1010) and the [MKR ENV Shield](https://store.arduino.cc/arduino-mkr-env-shield). The shield, mounted on top of the board, will record environmental data, such as temperature, humidity, pressure and illuminance. This data will be synced with the [Arduino IoT Cloud](https://create.arduino.cc/iot/), a service that allows us to remotely control and monitor our devices. +In this tutorial, we will combine the functionality of the [MKR WiFi 1010](https://store.arduino.cc/mkr-wifi-1010) and the [MKR ENV Shield](https://store.arduino.cc/arduino-mkr-env-shield). The shield, mounted on top of the board, will record environmental data, such as temperature, humidity, pressure and illuminance. This data will be synced with the [Arduino Cloud](app.arduino.cc), a service that allows us to remotely control and monitor our devices. This means that whenever we read data on the board, it will also be visible in the cloud dashboard, where we can create different ways of visualizing the data. @@ -22,13 +22,13 @@ This means that whenever we read data on the board, it will also be visible in t The goals of this project are: -- Configure the Arduino IoT Cloud. +- Configure the Arduino Cloud. - Create a program to read the sensors on the MKR ENV shield. - Read the data live in the Cloud dashboard. ## Hardware & Software needed -- [Arduino IoT Cloud](https://create.arduino.cc/iot/). +- [Arduino Cloud](app.arduino.cc). - [Arduino MKR WiFi 1010](https://store.arduino.cc/mkr-wifi-1010). - [Arduino MKR ENV Shield](https://store.arduino.cc/arduino-mkr-env-shield). - [Arduino_MKRENV](https://www.arduino.cc/en/Reference/ArduinoMKRENV) library. @@ -37,13 +37,13 @@ The goals of this project are: ![Mount the shield.](assets/IoT_ENV_IMG01.png) -## Configuring the IoT Cloud +## Configuring the Cloud -The first step in this tutorial is to navigate to the [Arduino IoT Cloud](https://create.arduino.cc/iot/). If you are not logged in, or do not have an account, you will be re-directed to the login page. Here you can create a new account or log in to an existing one. +The first step in this tutorial is to navigate to the [Arduino Cloud](app.arduino.cc). If you are not logged in, or do not have an account, you will be re-directed to the login page. Here you can create a new account or log in to an existing one. ### Configure a new device -Once we are in the Arduino IoT Cloud, we will need to click on the **"Devices"** tab. This will open a new page which will ask you to add a new device. Click on the **"Add device"** button. +Once we are in the Arduino Cloud, we will need to click on the **"Devices"** tab. This will open a new page which will ask you to add a new device. Click on the **"Add device"** button. ![Adding a new device.](assets/new_device.png) @@ -117,7 +117,7 @@ Now as a final part of the configuration, we just need to add our network detail ## Creating the program -Now, the final thing needed is the actual program that will run on the MKR 1010 board. We can edit the program directly in the Arduino IoT Cloud, by clicking on the **"Sketch"** tab. This will open up the built-in editor, where we can write the program directly. +Now, the final thing needed is the actual program that will run on the MKR 1010 board. We can edit the program directly in the Arduino Cloud, by clicking on the **"Sketch"** tab. This will open up the built-in editor, where we can write the program directly. ![The sketch tab.](assets/IoT_ENV_IMG06.png) @@ -142,12 +142,12 @@ void setup() { // Defined in thingProperties.h initProperties(); - // Connect to Arduino IoT Cloud + // Connect to Arduino 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 + related to the state of network and Cloud connection and errors the higher number the more granular information you’ll get. The default is 0 (only errors). Maximum is 4 @@ -183,15 +183,15 @@ The most important thing is that the two following commands are printed: ``` Connected to "Network" -Connect to the Arduino IoT Cloud +Connect to the Arduino Cloud ``` ### Over the Air Uploads -Did you know that the Arduino IoT Cloud supports over the air uploads? When you've uploaded a sketch to your board once, it will become available for you to upload a new sketch to the board without connecting it to your computer! +Did you know that the Arduino Cloud supports over the air uploads? When you've uploaded a sketch to your board once, it will become available for you to upload a new sketch to the board without connecting it to your computer! -***Over the Air uploads require an Entry plan to the Arduino IoT Cloud*** +***Over the Air uploads require an Entry plan to the Arduino Cloud*** -To use this feature, make sure the board has power. If your board is already connected to the IoT Cloud, you will be able to upload to it over the air. Navigate to the Things sketch tab in the Arduino IoT Cloud interface, and you should see it being discovered just as if it was connected via USB. +To use this feature, make sure the board has power. If your board is already connected to the Cloud, you will be able to upload to it over the air. Navigate to the Things sketch tab in the Arduino Cloud interface, and you should see it being discovered just as if it was connected via USB. ## Building a dashboard @@ -217,10 +217,10 @@ Congratulations! You can now view your real time data directly in the dashboard. ## Conclusion -In this tutorial, we demonstrated simply how a MKR WiFi 1010, a MKR ENV Shield and the Arduino IoT Cloud is used to create a simple IoT application. This, without having to connect a single wire, or create a difficult program: the cloud takes care of all of that. +In this tutorial, we demonstrated simply how a MKR WiFi 1010, a MKR ENV Shield and the Arduino Cloud is used to create a simple IoT application. This, without having to connect a single wire, or create a difficult program: the cloud takes care of all of that. You can now start thinking about how this application might work in real life. There are a lot of different things you can add to it, such as wind sensors (anemometers), rain sensors, CO2 sensors and much more. With some easy connections, you can build anything you want to, connect it to the cloud and view all the data live from anywhere in the world! ### More tutorials -You can find more tutorials in the [Arduino IoT Cloud documentation page](/arduino-cloud/). +You can find more tutorials in the [Arduino Cloud documentation page](/arduino-cloud/). diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/MKRRELAY_T1_IMG04.png b/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/MKRRELAY_T1_IMG04.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-relay-control/assets/MKRRELAY_T1_IMG04.png rename to content/arduino-cloud/11.application-notes/cloud-relay-control/assets/MKRRELAY_T1_IMG04.png diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/MKRRELAY_T1_IMG06.png b/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/MKRRELAY_T1_IMG06.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-relay-control/assets/MKRRELAY_T1_IMG06.png rename to content/arduino-cloud/11.application-notes/cloud-relay-control/assets/MKRRELAY_T1_IMG06.png diff --git a/content/arduino-cloud/03.tutorials/cloud-relay-control/assets/MKRRELAY_T1_IMG07.png b/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/MKRRELAY_T1_IMG07.png similarity index 100% rename from content/arduino-cloud/03.tutorials/cloud-relay-control/assets/MKRRELAY_T1_IMG07.png rename to content/arduino-cloud/11.application-notes/cloud-relay-control/assets/MKRRELAY_T1_IMG07.png diff --git a/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/cloud-relay-control-circuit.png b/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/cloud-relay-control-circuit.png new file mode 100644 index 0000000000..073807e144 Binary files /dev/null and b/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/cloud-relay-control-circuit.png differ diff --git a/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/cloud-relay-control-img11.png b/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/cloud-relay-control-img11.png new file mode 100644 index 0000000000..c3bcca1a8c Binary files /dev/null and b/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/cloud-relay-control-img11.png differ diff --git a/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/dashboard.png b/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/dashboard.png new file mode 100644 index 0000000000..cfff8643f1 Binary files /dev/null and b/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/dashboard.png differ diff --git a/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/thing.png b/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/thing.png new file mode 100644 index 0000000000..7e57b10597 Binary files /dev/null and b/content/arduino-cloud/11.application-notes/cloud-relay-control/assets/thing.png differ diff --git a/content/arduino-cloud/11.application-notes/cloud-relay-control/cloud-relay-control.md b/content/arduino-cloud/11.application-notes/cloud-relay-control/cloud-relay-control.md new file mode 100644 index 0000000000..b8a89936a0 --- /dev/null +++ b/content/arduino-cloud/11.application-notes/cloud-relay-control/cloud-relay-control.md @@ -0,0 +1,191 @@ +--- +title: 'Remote Relay Control' +description: 'Learn how to control the relays onboard the MKR Relay Shield through the Arduino Cloud dashboard.' +tags: [Relays, 24V] +author: 'Karl Söderby' +--- + +## Introduction + +This tutorial demonstrates how to use a MKR WiFi 1010 and a MKR Relay shield with the [Arduino Cloud](app.arduino.cc). We will create a simple configuration that allows us activate the relays on the shield through a dashboard. + +***You can easily change the board and shield for another setup, as long as the board is supported by the Arduino Cloud.*** + +## Goals + +The goals of this project are: + +- Set up the Arduino Cloud. +- Create a program that controls the relays. +- Create a dashboard to remotely control the relays. +- Use the Arduino Cloud Remote app to control relays. + +## Hardware & Software needed + +- [Arduino Cloud](app.arduino.cc) +- [Arduino MKR WiFi 1010](https://store.arduino.cc/mkr-wifi-1010) +- [Arduino MKR Relay Shield](https://store.arduino.cc/arduino-mkr-relay-proto-shield) +- Arduino Cloud Remote app (optional). + - [Play Store](https://play.google.com/store/apps/details?id=cc.arduino.cloudiot&hl=en&gl=US) + - [Apple Store](https://apps.apple.com/us/app/arduino-iot-cloud-remote/id1514358431) + +## Circuit + +![Mount the board on top of the shield.](assets/cloud-relay-control-circuit.png) + +## Cloud Setup + +To set up the Arduino Cloud, follow the steps below. In there, we will +- create and configure a device, +- create a Thing, +- create cloud variables, +- upload a program to the MKR WiFi 1010 board, +- create a dashboard. + +### Device Configuration + +To configure a device, navigate to the [app.arduino.cc/devices](app.arduino.cc/devices) and click on the **"create a new device"** button. Connect your board to your computer, and make sure you have the [Create Agent](https://create.arduino.cc/getting-started/plugin/welcome) installed. Your board will appear, and the installation takes a couple of minutes. + +***Learn more about Devices in the [Devices documentation](/arduino-cloud/hardware/devices).*** + +### Thing Configuration + +1. Create a new Thing, by clicking on the **"Create Thing"** button. +2. Click on the **"Select Device"** in the **"Associated Devices"** section of your Thing. Your previously configured device will appear from the list. +3. In the network section, enter your network credentials. + +***Learn more about Things in the [Things documentation](/arduino-cloud/cloud-interface/things).*** + +### Create Variables + +Next step is to create some cloud variables, which we will later sync with our Arduino MKR WiFi 1010 board. + +While in Thing configuration, click on **"Add Variable"** which will open a new window. Add the following variables with the specified configurations: + +| Variable Name | Data Type | Permission | +| ------------- | --------- | ------------ | +| `relay_1` | Boolean | Read & Write | +| `relay_2` | Boolean | Read & Write | + +Your Thing interface should now look something like this: + +![Thing Interface](assets/thing.png) + +***Need help understanding cloud variables? Check out the [Variables](/arduino-cloud/cloud-interface/variables) section.*** + +### Create Sketch + +After your device & Thing is configured, you can program your board. Navigate to the **"Sketch"** tab inside your Thing, where you can compile & upload your programs. You will find the sketch for this application in the code snippet below: + +```arduino +#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); + + pinMode(1, OUTPUT); + pinMode(2, OUTPUT); + + // Defined in thingProperties.h + initProperties(); + + // Connect to Arduino Cloud + ArduinoCloud.begin(ArduinoIoTPreferredConnection); + + /* + The following function allows you to obtain more information + related to the state of network and 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 + +} + +void onRelay1Change() { + // Do something + if(relay_1){ + digitalWrite(1, LOW); + } + else{ + digitalWrite(1, HIGH); + } +} + +void onRelay2Change() { + // Do something + if(relay_2){ + digitalWrite(2, LOW); + } + else{ + digitalWrite(2, HIGH); + } +} +``` + +Upload this sketch to your board, and your board will start attempting to connect to the Arduino Cloud and sync its data. + +You can verify that your device is connecting properly, by checking the Serial Monitor just after connection. Error codes are printed here. + +### Create a Dashboard + +Once you have your device running a sketch and syncing with the Arduino Cloud, you can create a **dashboard**, a visualization tool for monitoring & interacting with your board. + +Navigate to [app.arduino.cc/dashboard](app.arduino.cc/dashboard) and create a dashboard. Add two switches (or any other preferred widgets), and link them to each `relay_x` variable that we created earlier. These switches will be directly linked with your Arduino MKR WiFi 1010's variables, and will turn ON/OFF the relays on your board. + +You can also access your dashboard via the [Arduino IoT Remote app](/arduino-cloud/iot-remote-app/getting-started). + +![Interact with your board](assets/dashboard.png) + +***For more information on dashboards, available widgets and how to link them to your sketch, visit the [Dashboard & Widgets](/arduino-cloud/cloud-interface/dashboard-widgets) section.*** + +## High Power Pins + +***Note: Working with higher voltage components should be done with extreme caution. Do not alter the circuit while it is connected to a higher power source, and do not connect any high voltage components directly to the Arduino.*** + +We've now set up the cloud to control the relays, but there's nothing connected to the relays. The relays on the MKR Relay Shield are designed to typically handle anything from 5-24V, where you will need to connect an external power supply and a higher power component that can be controlled through the relays. + +There are six **high power pins** for both relays on the shield, with three different type of connections: NO, COM and NC. + +![MKR Relay Shield's high power pins.](assets/MKRRELAY_T1_IMG06.png) + +We are going to use the **NC** configuration, which means writing a **LOW** signal to the relay will connect the NC pin to COM, which provides power to the component connected. The circuit for this could look like this: + +![A circuit involving a 24V component.](assets/cloud-relay-control-img11.png) + +In this circuit, we are using a 24V power supply and a 24V heater. To control them, we need to use the following commands: + +To activate the relays: + +``` +digitalWrite(relay_1, LOW) +``` + +To de-activate the relays: + +``` +digitalWrite(relay_1, HIGH) +``` + +>**Note:** Use extreme caution when creating higher power circuits. Make sure that both the power supply and the component does not exceed 24V, as the relays are not designed to handle higher voltages. + +## Use Cases + +Relays can be used for practically any project that needs to switch on and off circuits. Typically, relays can be used to control: +- LED strips +- Fans +- Pumps +- Low power heating elements +- Low power fridges + +12/24V systems are also frequent in cars, boats & remote setups where a system might be powered by a 12/24V battery. \ No newline at end of file diff --git a/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/configureThing.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/configureThing.png new file mode 100644 index 0000000000..396ad08f29 Binary files /dev/null and b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/configureThing.png differ diff --git a/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/dashboardWidgets.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/dashboardWidgets.png new file mode 100644 index 0000000000..d568ed3eef Binary files /dev/null and b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/dashboardWidgets.png differ diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img01.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img01.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img01.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img01.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img02.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img02.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img02.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img02.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img03.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img03.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img03.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img03.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img04.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img04.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img04.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img04.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img05.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img05.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img05.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img05.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img06.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img06.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img06.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img06.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img07.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img07.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img07.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img07.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img08.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img08.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img08.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img08.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img09.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img09.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img09.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img09.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img10.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img10.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img10.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img10.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img11.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img11.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img11.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img11.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img12.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img12.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img12.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img12.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img13.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img13.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img13.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img13.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img14.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img14.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img14.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img14.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img15.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img15.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img15.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img15.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img16.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img16.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img16.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img16.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img17.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img17.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img17.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img17.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img18.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img18.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img18.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img18.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img19.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img19.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img19.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img19.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img20.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img20.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img20.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img20.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img21.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img21.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img21.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img21.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img22.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img22.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img22.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img22.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img23.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img23.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img23.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img23.png diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img24.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img24.png similarity index 100% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/assets/modbus-energy-meter_img24.png rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/modbus-energy-meter_img24.png diff --git a/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/openSketch.png b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/openSketch.png new file mode 100644 index 0000000000..907b74b8da Binary files /dev/null and b/content/arduino-cloud/11.application-notes/modbus-energy-meter/assets/openSketch.png differ diff --git a/content/arduino-cloud/03.tutorials/modbus-energy-meter/modbus-energy-meter.md b/content/arduino-cloud/11.application-notes/modbus-energy-meter/modbus-energy-meter.md similarity index 69% rename from content/arduino-cloud/03.tutorials/modbus-energy-meter/modbus-energy-meter.md rename to content/arduino-cloud/11.application-notes/modbus-energy-meter/modbus-energy-meter.md index ae5f8c5a9f..1286128e1d 100644 --- a/content/arduino-cloud/03.tutorials/modbus-energy-meter/modbus-energy-meter.md +++ b/content/arduino-cloud/11.application-notes/modbus-energy-meter/modbus-energy-meter.md @@ -1,5 +1,5 @@ --- -title: 'Monitor Your Energy Bill with Modbus and the Arduino IoT Cloud' +title: 'Monitor Your Energy Bill with Modbus and the Arduino Cloud' description: 'Connect a Modbus energy meter to an Arduino® MKR WiFi 1010 board and a MKR 485 Shield and monitor the power consumption of your home via an Arduino Cloud IoT dashboard.' tags: - Modbus @@ -14,6 +14,8 @@ author: 'Officine Innesto, José Bagur' If you really want to make your home smarter, you'll probably want start from your monthly bills (for example, energy, gas, etc...). As some say: **good for the planet, the wallet and the bottom line**. In this tutorial, we are going to learn how to connect a Modbus energy meter to the Arduino Cloud IoT using an Arduino® MKR WiFi 1010 board and an Arduino® MKR 485 Shield. +***This tutorial assumes you know the basics of the Arduino Cloud. If you are new check out our [Getting Started Guide](/arduino-cloud/guides/overview).*** + ## Goals The goals with this tutorial are: @@ -72,65 +74,7 @@ Now that we have finished setting up the hardware, it is time to connect our ene ## Setting Up the Arduino Cloud IoT -First, we need to register and configure our MKR WiFi 1010 board in the Arduino Cloud IoT. Let's start by navigating to [Arduino Cloud IoT](https://create.arduino.cc/iot). - -***Note: You will need a Arduino account to use the Arduino Cloud IoT. If you do not have one, you will be redirected to the account registration site.*** - -### Configure a New Device in the Arduino Cloud IoT - -Once we are in the Arduino Cloud IoT, we will need to select "**Devices**" tab. This will open a new page which will ask you to add a new device. Click on the "**ADD DEVICE**" button. - -![Adding a new device to our Arduino Clout IoT account](assets/modbus-energy-meter_img07.png) - -In the set up wizard, we will now have an option of either configuring a new Arduino® device, or a third party device. Let's select the "**Set up an Arduino device**" option. - -![Selecting the type of device to set up](assets/modbus-energy-meter_img08.png) - -At this point, we will need to connect our MKR WiFi 1010 board to our computer; we will also need to have installed the **Arduino Create Agent** in our computer. If the Arduino Create Agent is not installed, the set up wizard will ask us to install it. Our device should now show up as shown in the image below. Now its time to configure it, let's select the "**CONFIGURE**" button. - -![MKR WiFi 1010 board found!](assets/modbus-energy-meter_img09.png) - -Now we must name our device. In this case, we named our device as "**EnergyMeter001**"; names can be randomly generated also by the set up wizard. Let's continue by selecting the "**NEXT**" button. - -![Naming our MKR WiFi 1010 board](assets/modbus-energy-meter_img10.png) - -After selecting the "**NEXT**" button, the set up wizard will start to configure our board. This process may take a few minutes. - -![Configuration process of our MKR WiFi 1010 board and the Arduino Cloud IoT](assets/modbus-energy-meter_img11.png) - -Once it is done, select the "**DONE**" button, we will be redirected to the "Devices" page. In this page we are going to be able to see our device. Congratulations! The configuration of our board and the Arduino Cloud IoT is done, now we can create a "Thing" with it. - -![Configuration process of our MKR WiFi 1010 board and the Arduino Cloud IoT](assets/modbus-energy-meter_img12.png) - -### Create a New Thing in the Arduino Cloud IoT - -After our board is configured in the Arduino Cloud IoT, we can move on to the next step: creating a "Thing". Let's select the "**Things**" tab and then select the "**CREATE THING**" button. - -![Creation of a "Thing" in the Arduino Cloud IoT complete](assets/modbus-energy-meter_img13.png) - -We will be redirected to a page with our "Thing" configuration overview. Here we can define our "Thing" name, select to what network we are connecting to, what device we are using with out "Thing" and create variables that we want to to connect from our board to our "Thing" in the Arduino Cloud IoT. - -![Overview of a "Thing" in the Arduino Cloud IoT](assets/modbus-energy-meter_img14.png) - -Let's start by giving a name to our "Thing" and linking our freshly configured device. We named our Thing as "**Energy Thing**", this can be done by clicking in "**Untitled**". To link out freshly configured device, we select the "**Select Device**" button located to the right. This will open up a window where we can associate a previously configured device with our "Thing" by selecting the "**ASSOCIATE**" button. - -![Associating a device to a "Thing" in the Arduino Cloud IoT](assets/modbus-energy-meter_img15.png) - -### Creating Variables for a "Thing" in the Arduino Cloud IoT - -Now, let's create **variables** for the "Energy Thing". The variables we are going to create will be synced, automatically, with the Arduino Cloud IoT as long as the board is connected to Internet and the Arduino Cloud IoT. Let's create create a new variable by selecting the "**Add Variable**" button. - -!["ADD VARIABLE" button in the Arduino Cloud IoT](assets/modbus-energy-meter_img16.png) - -This will open up a window where we can create new variables and define its characteristics. The first variable we are going to create will be named "**voltage**"; this variable will have the following characteristics: - -- **Variable type**: Floating Point Number. -- **Variable permission**: read only. -- **Variable update policy**: on change (threshold do not changes). - -![Adding a variable to the "Energy Thing"](assets/modbus-energy-meter_img17.png) - - Repeat this process for the variables and its characteristics shown in the table below: +- Create a **Thing** with the following variables: | **Variable** | **Type** | **Permission** | **Update Policy** | |:---------:|:---------------------:|:----------:|:---------------:| @@ -140,22 +84,15 @@ This will open up a window where we can create new variables and define its char | frequency | Floating Point Number | Read Only | On change | | energy | Floating Point Number | Read Only | On change | +![Thing Set up](./assets/configureThing.png) -The created variables should appear now in the "Energy Thing" overview. - -![Variables of the "Energy Thing"](assets/modbus-energy-meter_img18.png) +- Set up your [MKR WiFi 1010](https://store.arduino.cc/products/arduino-mkr-wifi-1010) and configure your network credentials. -### Network Credentials for a "Thing" in the Arduino Cloud IoT - -Now that we have created the variables for the "Energy Thing", we can configure the network details. This can be done by selecting the "**Configure**" button in the "Network" section. This will open up a window where we can add the network SSID and its password. - -![Network credentiales of the "Energy Thing"](assets/modbus-energy-meter_img19.png) - -### Creating an Sketch for a "Thing" in the Arduino Cloud IoT +### Creating a Sketch for a "Thing" in the Arduino Cloud IoT Once we are finished with all the configurations of the "Energy Thing", we can move on to creating the sketch that we are going to upload to our MKR WiFi 1010 board. To do so, we first need to go to the "**Sketch**" tab. But before, let's talk about **Modbus**. -![Sketch tab in the Arduino Cloud IoT](assets/modbus-energy-meter_img20.png) +![Sketch tab in the Arduino Cloud IoT](./assets/openSketch.png) Modbus is an open source communication protocol designed specifically for industrial sensors and machines. In simple terms, it is a method used for transmitting information over serial lines between electronic devices. Our MKR WiFi 1010 board can talk Modbus using the [Arduino Modbus library](https://www.arduino.cc/en/ArduinoModbus/ArduinoModbus). This library packs all the handlers and makes hooking up any Modbus device to some of the Arduino® boards (like the MKR family boards) really fast and easy. You can read more about Modbus [here](https://en.wikipedia.org/wiki/Modbus). @@ -406,32 +343,34 @@ double readEnergy() { ``` ### Over the Air Uploads -Did you know that the Arduino IoT Cloud supports over the air uploads? When you've uploaded a sketch to your board once, it will become available for you to upload a new sketch to the board without connecting it to your computer! +Did you know that the Arduino Cloud supports over the air uploads? When you've uploaded a sketch to your board once, it will become available for you to upload a new sketch to the board without connecting it to your computer! -***Over the Air uploads require an Entry plan to the Arduino IoT Cloud*** +***Over the Air uploads require an Entry plan to the Arduino Cloud*** -To use this feature, make sure the board has power. If your board is already connected to the IoT Cloud, you will be able to upload to it over the air. Navigate to the Things sketch tab in the Arduino IoT Cloud interface, and you should see it being discovered just as if it was connected via USB. +To use this feature, make sure the board has power. If your board is already connected to the Cloud, you will be able to upload to it over the air. Navigate to the Things sketch tab in the Arduino Cloud interface, and you should see it being discovered just as if it was connected via USB. ### Creating a Dashboard in the Arduino Cloud IoT -After our code has been successfully uploaded to our board, we we will need to create a **dashboard** for **visualizing** the energy meter data. Head over to the "**Dashboards**" tab and click on "Build Dashboard". - -![Dashboards tab in the Arduino Cloud IoT](assets/modbus-energy-meter_img21.png) -An empty dashboard will be displayed. After changing the new dashboard's name, for example "Energy Meter Dashboard", let's add widgets to it. Let's click on the "**ADD**" button and select a "**Value**" widget. -![Adding a value widget into a dashboard in the Arduino Cloud IoT](assets/modbus-energy-meter_img22.png) +After our code has been successfully uploaded to our board, we we will need to create a **dashboard** for **visualizing** the energy meter data. -Now, we need to **link** the widget we just added to our dashboard to one of the energy meter variables we defined previously in the "Energy Thing" (voltage, current, power, frequency and energy). This can be done by selecting the "**Link Variable**" button and then selecting the variable you want to link with the widget; let's start with the variable **voltage**; remember also to give a name to the widget. +Create a dashboard with the following widgets: -![Linking a variable to a widget in the Arduino Cloud IoT](assets/modbus-energy-meter_img23.png) +| **Widget** | **Linked Variable** | +|:---------:|:---------------------:| +| Value | voltage | +| Value | current | +| Value | power | +| Value | frequency | +| Value | energy | -Follow the steps described above to link the rest of the variables of the "Energy Thing" to value widgets. We should see now all of the energy meter data being displayed on the dashboard, the data shown should update every `60000` ms when our MKR WiFi 1010 board is connected to the Arduino Cloud IoT. +Your dashboard should look something like this: -![Energy meter data shown in the Arduino Cloud IoT](assets/modbus-energy-meter_img24.png) +![Dashboard](./assets/dashboardWidgets.png) That's it! You have now a Modbus energy meter connected to the Arduino Cloud IoT! diff --git a/content/arduino-cloud/software.md b/content/arduino-cloud/software.md index f99d7b1353..ae0e8e6eea 100644 --- a/content/arduino-cloud/software.md +++ b/content/arduino-cloud/software.md @@ -1,5 +1,5 @@ --- -title: Cloud IoT Arduino +title: Arduino Cloud --- -Configure, program and connect your devices - all through the Arduino IoT Cloud service. \ No newline at end of file +Configure, program and connect your devices - all through the Arduino Cloud platform. \ No newline at end of file