IOT(MOD-4)
IOT(MOD-4)
• IoT devices are connected to the Internet and send information about themselves or about their
surroundings (e.g. information sensed by the connected sensors) over a network (to other devices
or servers/storage) or allow actuation upon the physical entities/environment around them
remotely. IoT Device Examples
A home automation device that allows remotely monitoring the status of appliances and controlling
the appliances.
• An industrial machine which sends information abouts its operation and health monitoring data
to a server.
• A wireless-enabled wearable device that measures data about a person such as the number
of steps walked and sends the data to a cloud-based service.
1. Sensing: Sensors can be either on-board the IoT device or attached to thedevice.
2. Actuation: IoT devices can have various types of actuators attached that allow taking actions
upon the physical entities in the vicinity of thedevice.
3. Communication: Communication modules are responsible for sending collected data to other
devices or cloud-based servers/storage and receiving data from other devices and commands
from remote applications.
4. Analysis & Processing: Analysis and processing modules are responsible for making sense of
the collecteddata.
Block diagram of an IoT Device
Exemplary Device: Raspberry Pi
Raspberry Pi is a low-cost mini-computer with the physical size of a credit card. Raspberry Pi runs
various flavors of Linux and can perform almost all tasks that a normal desktop computer can do.
Raspberry Pi also allows interfacing sensors and actuators through the general purpose
I/O pins. Since Raspberry Pi runs Linux operating system, it supports Python "out of the box".
Raspberry Pi is a low-cost mini-computer with the physical size of a credit card. Raspberry Pi runs
various flavors of Linux and can perform almost all tasks that a normal desktop computer can do.
Raspberry Pi also allows interfacing sensors and actuators through the general purpose I/O pins.
Since Raspberry Pi runs Linux operating system, it supports Python "out of the box".
Raspberry Pi
Linux on Raspberry Pi
1. Serial: The serial interface on Raspberry Pi has receive (Rx) and transmit (Tx) pins for
communication with serialperipherals.
2. SPI: Serial Peripheral Interface (SPI) is a synchronous serial data protocol used
for communicating with one or more peripheraldevices.
3. I2C: The I2C interface pins on Raspberry Pi allow you to connect hardware modules. I2C
interface allows synchronous data transfer with just two pins - SDA (data line) and SCL
(clockline).
Raspberry Pi Example: Interfacing LED and switch with Raspberry Pi
from time import sleeP import RPi.GPIO asGPIO GPIO.setmode(GPIO.BCM)
#Switch Pin GPIO.setup(25,GPIO.IN) #LEDPin
GPIO.setup(18,GPIO.OUT)
state=false
deftoggleLED(pin):
state = not state GPIO.output(pin,state)
whileTrue:
try:
if (GPIO.input(25) ==True):
toggleLED(pin) sleep(.01)
exceptKeyboardInterrupt:
exit()
Other Devices
1. pcDuino
2. BeagleBoneBlack
3. Cubieboard