Code Sample: Send Data with MQTT to Microsoft Azure* using UP Squared* and Arduino Create*

By Evelyn Grevelink, Published: 02/16/2018, Last Updated: 02/16/2018

This tutorial demonstrates how to use an UP Squared* board together with the Arduino Create* IDE to send sensor data with MQTT (a messaging protocol suited for IoT applications) to the Microsoft Azure* cloud platform.

What You’ll Learn

Follow along with this tutorial to learn how to:

  • Set up an IoT Hub to enable communication between a cloud platform and the UP Squared
  • Get credentials for your UP Squared device
  • View data (sent via MQTT) using the Device Explorer GUI on Windows

How it Works

You’ll create an IoT Hub to enable communication between the Microsoft Azure* cloud platform and your UP Squared device, set up an application (the Device Explorer GUI on Windows*) for viewing data, and then run a sketch in Arduino Create (.ino file) that reads data from a rotary angle sensor and sends it to Microsoft Azure. You can then view the data being sent with MQTT through the Device Explorer from Microsoft*.

How to Get Started

Gather your materials

Hardware

Software

Create an account with Microsoft Azure*

You can sign up for a free trial here.

Create an IoT Hub

To enable communication between the cloud platform (Microsoft Azure) and your UP Squared, create an IoT Hub through the Azure portal.

Continue on GitHub*

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804