Elements form the core of all programming aspects to the Digi-Key IoT Studio, including counters, variables, Bluetooth interfaces, and cloud functions. The default elements provided by the IoT Studio allow a designer to access the majority of important hardware on their selected platform (such as a Huzzah32). However, most designs rely on some kind of external hardware that provides a specific purpose (such as a light sensor), so getting these to work with the Digi-Key IoT Studio is critical. In this how-to, we will look at how to add new libraries (using the TEMT600 ambient light sensor as an example).
The first step of adding hardware to the Digi-Key IoT Studio is to ensure that there is a library available for it. To see the available list of hardware compatible with the studio, click the “Add Element” button located below the element toolbox.
When this button is clicked, a window will appear that shows the list of hardware that is compatible with the studio. Finding the needed hardware can be done by scrolling through the list, but it may be easier to use the search box to find the part that you are looking for. In this case, we will look for an ambient light sensor, so we will search “ambient” to see what results appear.
From this list, we will pick the TEMT6000 and click the shopping cart icon to see the sensor on Digi-Key to get more information about how the sensor works.
Before we select this sensor, we need to see how it works and figure out how to connect it to our device (in this case, the Huzzah32). The TEMT6000 is an analog device with three pins - the signal (analog), ground, and power, which is a very easy connection to make.
We will use this sensor in our project, so to add the TEMT6000 element, we simply go back to the element library window and click the enable button next to the TEMT6000 element.
At this point, we can now start to use the newly imported element, and it will appear under “Imported” in the element toolbox window.
The large number of element types that can be imported into projects provides designers with ample opportunity and variety to develop projects and products. Examples of other hardware that is compatible with the Digi-Key IoT Studio include: air quality sensors, GPS, pressure sensors, temperature sensors, near field communication, relays, Wi-Fi, and accelerometers. However, some designers may find that their project requires a specific part that is not listed in the element library window. In this case, the designer can choose to create their own element library and import it into the IoT Studio. However, this requires advanced knowledge of code, which can be challenging to those who are new to IoT development.