The best tools to make your project dreams come true

Login or Signup

How to Use the SensorTile with the Digi-Key IoT Studio

1/22/2020 | By Maker.io Staff

 

The SensorTile is a compact IoT development platform that is compatible with the Digi-Key IoT Studio and can be used in a wide range of applications.

In this how-to, we will learn how to use the SensorTile with the Digi-Key IoT Studio and see a simple sensor example!

 

 

BOM

  • ST SensorTile
  • ST Nucleo
  • Jumper wires
  • USB mini B
  • USB micro B
  • Smartphone with Android or iOS and the Digi-Key IoT Studio App

Scheme-It

How to Use the SensorTile with the Digi-Key IoT Studio

Scheme-It

Some First Steps on Windows

In order to be able to use the SensorTile, there are a few prerequisites that need to be met. The SensorTile itself cannot be programmed directly by a computer and requires an ST-Link. The best method for doing this is to use the ST Nucleo board that includes an ST Link and header that can be connected to the SensorTile motherboard. The whole setup also requires the installation of two drivers:

Once these two have been downloaded and installed, it is time to check that the ST-Link is correctly recognized. Connect the ST-Link (via a USB B Mini cable) to your computer and check to see if the hardware is recognized. If there is no indication of hardware being recognized, navigate to Device Manager and check to see if you have the following device drivers:

How to Use the SensorTile with the Digi-Key IoT Studio

Now that we have confirmed that the drivers are working, we can now connect the SensorTile to the motherboard and the motherboard to the Nucleo via the provided 5-pin header. The 5-pin header is connected between the SWD on the Nucleo and the SWD on the SensorTile motherboard. The Nucleo also requires the two jumpers found on the ST-LINK pin header to be removed so that the SensorTile can be programmed. The last step is to connect the SensorTile to the computer via a micro USB cable for power.

How to Use the SensorTile with the Digi-Key IoT Studio

Getting Started with STMicroelectronics SensorTile

Getting Started with STM32 and Nucleo

At this stage, if everything works correctly you should see the following USB drive under “My Computer."

How to Use the SensorTile with the Digi-Key IoT Studio

Creating a SensorTile Project

SensorTile projects are created in a similar way to other projects. On the Digi-Key IoT Studio, start by clicking New Project under the Projects tab, and then in the device list, select SensorTile. Give the project a name and then click the Create button.

How to Use the SensorTile with the Digi-Key IoT Studio

Just like the Adafruit Huzzah32, we are presented with the same development environment including elements, application builder, and cloud development tools. For this simple example, we will drop an interval into the project as well as the LSM303AGR Interval element and then the Bluetooth Characteristic element. The interval will probe the LSM303 element once a second for the latest temperature reading and then the LSM303 element will send its read data to the Bluetooth element.

How to Use the SensorTile with the Digi-Key IoT Studio

The application side of this SensorTile example is trivial and consists of an interval element, a Bluetooth element, and a label. Once a second, the interval element reads the latest data over Bluetooth and then this value is displayed on the label element. The value shown is the current temperature read from the SensorTile and shows how sensory data can be obtained from the SensorTile.

How to Use the SensorTile with the Digi-Key IoT Studio

Programming the SensorTile

Now that we have our program ready to be flashed to the SensorTile we need to compile the project. Once compiled we click the download button as we would do on the Adafruit Huzzah32. However, you will notice that, despite Atmosphere IoT running, you will see a .bin file download instead of the usual programming window. This downloaded file is our project that we need to transfer to the SensorTile and this is a very trivial step to do.

All that is required is that the downloaded .bin file is copied and pasted to the flash drive that appears when the ST-Link board is connected to the computer. The image below shows the flash drive on my computer that I drag it to and its total size should be around 540KB. Those who have used the micro:bit will recognize this step as it is the same way that the micro:bit is programmed.

How to Use the SensorTile with the Digi-Key IoT Studio

Once programmed, the SensorTile can be accessed via the Digi-Key IoT Studio Android app and once the device is added our app will launch and we can interact with the SensorTile. We’ll see the SensorTile used in more projects and how-to’s in the future!