Over-the-air (or OTA) programming is a very useful feature in all those cases where your devices are located in places that are not easily accessible. For example, you built a weather station using the Oplá IoT Kit, installed it on your rooftop, and started monitoring the weather from an IoT Cloud dashboard. That’s great until you find a bug or want to modify something and have to climb on your roof with a laptop to do so. Here’s where OTA becomes handy.
How it works
To use OTA, you need to do two things: enable a device and create a Thing.
To enable a device, you need to connect a board to the IoT Cloud and update the firmware. Just plug the device into the USB, go to the Device tab, and click Add Device. A wizard will guide you through the process — at the end, your board will be available as a target for the upload over-the-air and you will be able to update the sketch remotely!
A Thing is a component that manages the dialogue between the cloud and the physical device thanks to a dedicated library (the Arduino Connection Handler), and stores the data into the cloud. Creating a Thing is simple: just select the voice from the IoT Cloud’s main menu, configure the variables that you want to exchange with the device, and pair the board that you have just enabled.
If you are new to the IoT Cloud, here is an in-depth tutorial on how to build an IoT project with Arduino Create. Once you have configured a Thing, you will be able to perform OTA updates.
Devices that can be updated via OTA will appear in the dropdown list of all updatable devices in the online editors of Create — the full Web Editor and the new Sketch Editor have been introduced in the Thing configuration page to make minor changes to the code.
This Sketch Editor is one of the innovations that we have introduced in the IoT Cloud with two objectives in mind:
1. Help those who are learning to program with Arduino follow the tutorials of IoT projects, such as those included in the Oplà IoT Kit.
2. Allow users to quickly make small changes to the sketch, which do not require access to libraries or more sophisticated editing functions.
If you want to know more about OTA and the redesign of the IoT Cloud, we have prepared a couple of detailed tutorials that will walk you through the exploration of the new features.
New to Arduino Create? It’s a platform that helps you develop and manage connected projects with Arduino, featuring tools to code, monitor, and control devices from the Internet and your smartphones. Sign up for free now!