My First Experience with Arduino IoT Cloud by Kostiantyn Chertov

My First Experience with Arduino IoT Cloud

 

The story started on the online learning site, Udemy, where I came across the course “Building Internet of Things Projects with Arduino IoT Cloud”. A simple Google search confirmed that the open-source hardware and software platform, Arduino, had officially released the Arduino IoT Cloud. It came as a surprise as prior to this, I had only been aware of their set of boards and software, Arduino Integrated Development Environment (IDE). I decided to investigate further!

First of all, you need to register the device; in my case, it was an MKR GSM 1400 board.

image9

The second step involves creating the first ‘thing’. My model was quite simple: a LED which can be controlled over the board.

image11

According to the IoT Cloud philosophy, my Thing LED_GREEN only has one Property – a logical (ON/OFF) variable ledState. As Property permission was R & W (Read and Write), it means the state of the variable can be controlled from the cloud.

image3

The next step was to update the auto-generated code. Here, I needed to define the pin used to control the LED, which was pin #2 in my case.

image4

Next, I set up the pin mode as OUTPUT and expanded the onLedStateChange() function.

image5

This created the Dashboard DemoLED which was bound to the Thing, LED_GREEN and property ledState. Below is a view of the Dashboard:

image8

Then, it was time to return to the physical world and complete my very first Internet Thing!

I connected the MKR GSM1400 to the computer via USB cable and to the breadboard, which contains a LED and a resistor. During this stage, I also connected the GSM antenna and LiPo accumulator.

image6.2

Despite inserting the SIM into the MKR board, the Sysmocom replacement FPC cable was used together with the SIMtrace2 Hardware Kit. The APDU traces were analyzed by Wireshark software.

image1

As soon as GSM registration was successful, it was time to download the code from the Web Editor and then disconnect the USB cable to enjoy the Thing-to-Cloud interface.

image10

The LiPo accumulator supplied the power while the board was disconnected from USB.

The last step: open the Dashboard and switch the LED on.

image2

It actually works! The Thing is successfully controlled from the cloud and the project contains no more than ten lines of hand-written code.

image7

Kostiantyn Chertov

Research and Innovation

Posted: January 25, 2021