Hands-On IoT Solutions with Blockchain
上QQ阅读APP看书,第一时间看更新

Devices

Devices are located at the edge of the IoT solution. In fact, these devices are what we call Things in the context of IoT. They are usually capable of sending and receiving data events.

As an example, a device with an embedded soil moisture probe can detect that the monitored soil has 43% moisture. It can then report this informative event to the platform it's connected to. The platform can then send an action event to the device, triggering a water valve to open and restore the soil moisture. This interaction depends on other aspects related to the device, which will be covered in upcoming sections. For now, let's focus on the device.

In order to handle these types of interactions, you may think of a device as a computing unit that has analog or digital (or both) processing capabilities. This means that it is able to read and write analog and digital signals to their probes and actuators.

An analog signal is a signal that can vary in a range of values. Let's take an Arduino Uno board, for example. Arduino Uno has a 10-bit resolution analog-to-digital converter (ADC), which means that it can read voltages from 0V to 5V and map them into integer values between 0 and 1,023 (210 = 1,024). Analog signals are generally used to read data from analog sensors.

A digital signal is a binary signal, which means that it has only two possible values: 0 or 1, high or low. This kind of signal is mostly used to identify or change on and off states, for example, turning an LED bulb on or off.