The best tools to make your project dreams come true

Login or Signup
USD

5/15/2019 | By Maker.io Staff

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

BOM

*Adafruit Huzzah 32 - 1528-2181-ND

*USB Micro B cable - Q853-ND

*Atmosphere IoT Agent

 

Scheme-It

Image of How To Use Digi-Key’s IoT Studio with Standard IoT Devices

Scheme-It

How IoT Studio Works

The Digi-Key IoT studio is an online software platform that makes creating IoT projects simple and quick. Instead of having to learn device specifics or even computer code, the designer instead uses a graphical interface where blocks are connected via arrows, and actions for those arrows are selectable via drop-down boxes. The platform not only removes the need for code but also compiles and handles IoT services, including data storage and live monitoring of connected devices. These tasks, however, can be complex, and with so many features available, this article will walk through getting the Huzzah’s onboard LED to blink.

Because the platform is located online, a small local program needs to be installed onto your computer that forms the bridge between the IoT device and Digi-Key IoT Studio for programming purposes. Therefore, the first task we will do is install this program, which is called “Atmosphere IoT Agent.” To download the installer, click the link below:

https://developer.atmosphereiot.com/documents/downloads/atmosphereiotagent.html

Once downloaded, run the installer to install the IoT agent. Windows 10 may show a prompt saying that Windows protected your PC, but assuming that you downloaded the IoT agent from the official site, this is a false positive that can be ignored (more info > Run anyway).

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

The installer can take up to 10 minutes to finish its work, and you might see something that looks like this during that process (this is normal):

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

A Blinking Light on the Huzzah32

With the Atmosphere IoT Agent installed, it is time to go to the Digi-Key IoT Studio and create our first project. To do this, click the net symbol in the panel on the left and then click “New Project.”

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

You will be presented with a list of devices that you can choose from, but since our example will be using the Adafruit Huzzah32, this is what you must select!

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

Once created, you will be presented with the New Project, a blank canvas, and tools to your right that can be used to create your own project. The project space has three main tabs: the device you’re using, Application, and Cloud. The device tab is used to create the program that runs on the device (such as a blink example), the application tab is used to create the mobile app that interfaces with the device, and the cloud tab is used to create cloud functions that interact with the app and device. In our first example, we will only be concerned with the device, so these other tabs are not needed.

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

The first element that we need to add to our canvas is the “Interval” element, which can be thought of as a timer that triggers an event once every so often. To do this, simply click the Interval element in the Element toolbox, and you will see it appear on the canvas. This element can be dragged around with the mouse and repositioned wherever you like.

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

When you click on an element, the element box changes to show the properties of that selected element. In our case, if we select the Interval element, we will see how we can change the name of the element, the time at which interval triggers occur, and what the element triggers. For now, we will leave these unchanged.

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

The next element we need to add is the GPIO Pin element. When you add this to the canvas, make sure to drag it to the right of the Interval element (since program flow in Digi-Key IoT Studio is typically right to left). Click this element and change its GPIO Pin to IO13, as this is the pin that connects to the Huzzah32’s onboard LED. Also, make sure that the GPIO mode is set to Output Push Pull.

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

The last step in our program is to connect the two elements together so that the LED is toggled every time the interval element fires. To do this, hover the mouse over the right side of the Interval element until you see a double-sided arrow (<->) and then click and drag to the GPIO Pin element. An arrow will be formed between the two elements, and this arrow in itself is an element that can be clicked and have its properties changed. Make sure that the Ability property is set to toggle!

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

Now that the blink program has been made, it’s time to program our Huzzah device. Connect the Huzzah32 to the computer and make sure that it is recognized. Ensure that the Atmosphere IoT agent is running, and then click Compile in the Digi-Key IoT Studio (top right).

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

There is a small popup in the bottom of the window that will show two notifications: one when the project is compiling, and one when it has been compiled.

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

The last step is to program the Huzzah32, which is done by clicking the Program Firmware button (a small chip icon just above the canvas on the right side.)

How To Use Digi-Key’s IoT Studio with Standard IoT Devices

When you click this, you will be presented with the window below, and here you will need to specify the COM port and serial speed of your Huzzah32. The settings shown here work fine, and once programmed, your Huzzah32 onboard LED will blink! If you find that your browser just downloads a zip file, then you need to refresh your browser, as it does not recognize the Atmosphere IoT bridge.

How To Use Digi-Key’s IoT Studio with Standard IoT Devices