The best tools to make your project dreams come true

Login or Signup
USD

7/3/2019 | By Maker.io Staff

Digi-Key IoT Studio Basic Elements

The Digi-Key IoT Studio provides a new method for prototyping IoT applications without the need for learning about device specifics or even having any prior knowledge on writing code. In this How-to, we will look at some of the different elements available for the Huzzah32 (and most standard IoT devices).

BOM

Scheme-It

Digi-Key IoT Studio Basic Elements

Sheme-It

Element Types

There are many elements to choose from in the Digi-Key IoT Studio, and there are elements for devices, the application, and the cloud functions, but in this How-To, we will only be looking at Device elements and what they do.

Bluetooth

Digi-Key IoT Studio Basic Elements

BLE GATT Characteristic

This element is used for configuring the characteristics of the Bluetooth connection. Characteristics that can be changed include the UUID, Service UUID, the ability to read/write, the type of data that is read, and the type of data that is written.

BLE Connection

The BLE Connection element is used for creating Bluetooth connections, and this element will be critical when connecting our device to the Digi-Key IoT Studio system (so that we can view live data from the device). This element includes properties such as the pairing type and the passkey, and it behaves similarly to the Wi-Fi Connection element (connected, disconnected, etc.).

Cloud

Digi-Key IoT Studio Basic Elements

Cloud Command

This element is used to trigger events and actions when a cloud command is received. For example, the cloud could be programmed to read data from other devices and then combine this data to produce a result (such as light switch press detection). Then, when the combined result reaches the desired value, the cloud can send a command to a device to perform an action.

Cloud Event

The Cloud Event element is used to send events to the cloud. For example, an ADC pin can be read at specified intervals, and then the value of the ADC can be sent to a Cloud Event element to send the data to the cloud.

Basic Elements

Digi-Key IoT Studio Basic Elements

Function

The function element itself can be used with the code editor to create custom functions. This is something that only advanced users, who have knowledge and experience in microcontroller coding, should use.

GPIO Pin

This element is used to interact with the GPIO pins on your selected device. This can be used to configure GPIO, read GPIO, and write to GPIO.

ADC Pin

This element is used to read from analog input pins. The output of this element is an unsigned integer, so be sure to check that the elements read from this are treating the data as an unsigned integer.

PWM Pin

This element is used to create a PWM signal on the chosen GPIO pin with a set frequency and duty cycle. The duty cycle can be changed with other connected elements (such as Variable elements).

UART

The UART element is used to send and receive data over the inbuilt UART connection. The element itself can be used to change the baud rate while elements that connect to it can trigger sending data or read data.

Interval

The interval element is similar to a timer that triggers connected events after a certain interval. The length of the interval can be adjusted, and this element is one of the most commonly used elements, as it can be used to dictate timed events.

Comparison

The comparison element is used to perform a comparison between a piece of data and some constant. The comparison element is capable of comparing both numbers and strings and is useful in applications such as thermostats, monitors, and control systems. Conditions that cause a trigger include equal, less than, and greater than.

Type Conversion

The Type Conversion element is used to convert one type of data into another. For example, if a number is to be sent over UART, but instead of sending a binary number, a string is desired, this element can be used to do this task.

Mathematical Operation

This element is used to perform math operating onto the element that connects to this element. For example, a variable can have its value increased or decreased by a constant when some event is triggered.

Variable

The Variable element is used to define and store a variable. The variable can have a unique name assigned to it and all instances of that name refer to that variable. Variables can have values assigned to them, and their values can be retrieved for use in other elements (such as sending to the cloud and performing mathematical operations).

Regular Expression

The Regular Expression element is used for string comparisons (based on the Python RE command) including matches for characters, patterns, exact matches, and parsing. This is a complex element that should be used only by more experienced users.

Debug Print

This element can be used to send debug messages over the UART port for reading on a computer. This element will only be useful during the prototype stage where the IoT device under development is connected to a computer that both recognizes the device and has a virtual COM port that can be used to read the serial device from the IoT device.

Wi-Fi

Digi-Key IoT Studio Basic Elements

The Wi-Fi element is used to connect and disconnect from a specified Wi-Fi network. Properties that can be changed include the SSID and password, while events can be triggered upon a successful connection or disconnection.