Basic building blocks of an IoT Device
• Exemplary Device: Raspberry Pi
• Raspberry Pi interfaces
• Programming Raspberry Pi with Python
• Other IoT devices
WhatisanIoTDevice
•A "Thing" in Internet of Things (IoT)canbe anyobjectthathasa
uniqueidentifierandwhichcan send/receivedata(includinguser
data)overa network(e.g., smartphone, smart TV, computer,
refrigerator, car,etc.).
•IoTdevicesareconnectedtotheInternetandsendinformation
aboutthemselvesorabouttheirsurroundings(e.g.information
sensedbytheconnectedsensors)overa network(tootherdevicesor
servers/storage) or allow actuation upon the physical
entities/environmentaround themremotely.
IoTDeviceExamples
•Ahomeautomationdevicethatallowsremotelymonitoringthe
status of appliancesand controllingthe appliances.
•Anindustrialmachinewhichsendsinformationaboutsitsoperation
and health monitoring data toaserver.
•Acarwhichsendsinformationaboutits locationto acloud-based
service.
•Awireless-enabledwearabledevice thatmeasuresdataabouta
personsuchasthenumberofstepswalkedandsendsthedatatoa
cloud-basedservice.
RaspberryPiGPIO
•IdentificationofthepinnumberingsviaLinuxcommand
•ThereisaLinuxcommandtofindoutwhichnameisforwhichGPIOpin.Soin
thatcase,wedonothavetoworryaboutatutorialoracheatsheettohaveby
oursidetocheckoutthepinnumberingsoftheRaspberryPiallthetime.
•Type the following command in the terminal,
pinout
RaspberryPiGPIO
RaspberryPiInterfaces
RaspberryPiInterfaces
Serial
•TheserialinterfaceonRaspberryPihasreceive(Rx)andtransmit(Tx)pins
forcommunicationwithserialperipherals.
•GPIO14–UARTTx
•GPIO15–UARTRx
RaspberryPiInterfaces
SPI
•SerialPeripheralInterface(SPI)isasynchronousserialdataprotocolused
forcommunicatingwithoneormoreperipheraldevices.
•In an SPI connection, there is one master device and one or more
peripheral devices.
RaspberryPiInterfaces
•There are five pins on Raspberry Pi for SPI interface.
•MISO (Master In Slave Out) : Master Line for sending data to peripherals (GPIO 9).
•MOSI (Master Out Slave In) : Slave line for sending data to master (GPIO 10).
•SCK (Serial Clock) : Clock generated by master to synchronize data transmission (GPIO
11).
•CEO (Chip Enable 0) : To enable or disable devices (GPIO 8).
•CE1 (Chip Enable 1): To enable or disable devices (GPIO 7).