Understanding the Basics of SmartWorks using an Arduino Board

This tutorial will guide you through the process of learning the basics of the SmartWorks platform.

In this training you will:
  • Create a Thing and send data from an LDR sensor connected to an Arduino Nano 33 IOT to the platform.
  • Create a Dashboard to visualize the data using MQTT.
  • Add a button to control the MQTT architecture using HTTP.

Required Devices

  • Arduino Nano 33 IOT
  • Any analogic sensor (in our example is an LDR)
  • A button
The schema below will help you with the electronic wiring.
Figure 1. Wiring schematic

Get Started

To begin, download this file.

Click below to watch the tutorial.

Important Note

The bearer token is no longer directly exposed in the API Inspector. To generate a bearer token you need to follow the steps detailed below:
  1. Create an App type client_credentials as shown here and include the scopes required. For example, for this tutorial:
    1. Scope category to perform actions related with categories (create, get information, delete).
  2. Enter the credentials for the app in the API Inspector as shown below and click Get Token.


    Figure 2.
  3. Open the Auth tab and notice that it has been populated with the bearer token. Use it to change the code and continue with the tutorial.


    Figure 3.