IoT Technical Publications
IoT Technical Publications
Syllabus
OT and clowd. Fog computing, Security in cloud, Case stucy.
Contents
41 Introduction of Cloud Computing
42 Fog Computing
4.3 Security in Cloud
(4- 1)
loT and its Applicationss 4-2
Cloud for loT
4.1 Introduction of Cloud Computing
Cloud computing refer to a variety of services available over the Inte
deliver compute functionality on the service provider's infrastructure. Internet hat
Its environment (infrastructure) may actually be hosted on either a grid
or utility
computing environment, but that doesn't matter to a service user.
Cloud computing is a general term used to describe class of network
network base
a new
Cloud Provider : A
person, organization, or
service available interested parties. When
to entity responsible for maa
an
organization is responsible for making assuming the role of cloua
cloud services availabie to
P cloud
Internet
Data centers
Client computers
Distributed servers
Private cloud
Public cloud
accessible for
everyone
services
and much used for the 0
Examples of public services are co
Public cloud benefits: Facebook, Google and Linkedln
a) Low investment hurdle :
Pay for what
you use.
4 5 Cloud for IoT
Applicetions
is
and
oT
www.e
wwwwR22
Organization 2
Organization 1
cloud
Fig. 4.1.3 (c) : Community
servers.
scale to many
environment for applications that
D) Good test/development
Public cloud risks : Internet.
transfers over the
concerns Multi-tenancy and
ecurity control over data center
negatively to loss of
organization may react
function.
2.Private Cloud It may be
for a single organization.
The O u d infrastructure is operated solely on-premises
or
l
security concerns as existing
rganization retains control over data center.
rdle
ew hard
OT new hardware and software.
PUBLICATIONS An up
thrust forknowedge
cCHNICAL
4-6
Applications
lOT and its
Cloud for IOT
are required; old processes not
b) New operational processes all suitable
private cloud. for
3. Community Cloud
. The cloud infrastructure is shared by several organizations and
and supren
supports a
community that has
shared concerns (e.g. mission,
pecitfic
security requirements, Pecis
policy.
It may be managed by the
compliance considerations).
exist on-premises or off-premises.
organizations or a
thir
third
party and may
4. Hybrid Cloud
. The cloud infrastructure is a composition of two or more cloud
community or public) that remain unique entities but are bound
standardized proprietary technology that enables data and together b
or application
and applica
portability (e.g, cdoud bursting for load-balancing between clouds).
Hybrid cloud benefits
a) Operational flexibility : Run mission critical on private cloud, dev/test on uhlie
cloud
b) Scalability: Run peak and bursty workloads on the public cloud
. I tis clear that the security issue has played the most important role in hindering
cloud computing acceptance.
Without doubt, putting your data, running your software on someone else's hard
disk using someone else's CPU appears daunting to many.
Well-known security issues such as data loss, phishing, pose serious threats to
organization's data and software.
Business concerns of cloud computing8
1. Capacity Storage capacity is of the main reasons for
planning : one
on-premise IT infrastructure.
unnecessarily over-spending on
Fog nodes
1. Receive feeds from loT devices using any protocol, in real time.
2. Run loT-enabled applications for real-time control and analytics, with m
response time.
Provide transient storage, often 1-2 hours.
. I n essence, fog is the standard, and edge is the concept. Fog enables repeatable
structure in the edge computing concept, so enterprises can push compute out of
centralized systems or clouds for better and more scalable performance.
are of the Adafruit IO system. The feed holds metadata about the
the core
.Feeds
data you push to Adafruit IO. This includes settings for whether the data is public
license the falls under, and a general
stored data
or private, what sensor
one feed for each unique source of data you send to the
.You will need to create
have a project with one temperature sensor and two
system. For example, if you
sensors, you would need to create three
feeds. One feed for the
humidity
sensor, and one feed for each humidity sensor.
temperature
.Dashboards allow you to visualize data and control Adafruit 1O connected projects
buttons
Widgets such as charts, sliders, and
are
from any modern web browser.
without the
available to help you quickly get your loT project up and running
need for any custom code.
4. Rapid elasticity
5. Measured service
Syllabus
Contents
5.1 loTApplication in Food
5.2 Healthcare Application
53 Lavatory maintenance
5.4 Water Quality
5.5 Warehouse
5.6 Retail
5.7 Driver Assistance
(5 1)
Application
5-2 Building with lo
Applications
its
loT a n d
Food
in
5.1 loT
Application
are
sensitive
to temperature, and thus,
and easonable
beverages temperatures are maintained
ar
food and to
ensure
the
ed atat the
Many conducted
temperature
temperature leu
levels could cause
control
must be
Failure
gulate the right
to regulate
level.
endanger
the public.
appropriate
diseases
that might
food-borme
food, companies
are using mart thermostats
smas
Ostats
to
the issue of unsafe ucts in
products in real-time.
.To eradicate
manutactured
of the e
the temperature
constantly
monitor
means that if the temm
of the
temperature ure of the
monitoring
standard, that product
is rem
removed out of
Real-time
roduct falls
below the set irculation to
guarantee food safety.
with QR codes that customers can
customers
loT systems
are equipped scan to
.Integrated This creates an assurance between the
the consumer
confirm the safety
product. of the
that the food is safe for
consumntion
manufacturing company
and the
requires speed and volume to be
pronktsLt
quality,
demand, istent
maintaining machine conditions are only a few ofensuring m i n i s y s t e m sa n d
LT data from all these systems can be centralized and put where it's needed to
allow for continuous improvement in food manufacturing.
EMR/PMSs ...
*** *******
ww*
************* *******
.
***
******
******* :
***********"*
********************** Device
Specialist gatewa wwww
E-health cloud
*
www.ww
wwwww
*
**x
*wwwww**
ww*
Home
Partner monitoring
cloud service/CDS
Sink
N WIFi
atatase
Internet
On body sensors
WiFi
Heaith cartte
At home
.The development of wireless networks has led to the emergency of a new type of
e-healthcare system, providing expert-based medical treatment
remotely on time.
.With the e-healthcare system, wearable sensors and
portable wireless
automatically monitor individuals' health status and forward them to thedevices can
hospitals
doctors and related people.
The system offers great conveniences to both
For the
patients
and health care providers.
patients, the foremost
advantage reduce the waiting time of diagnoss
is to
and medical treatment, since
they can deliver the emergent accident information to
their doctors even if
they are far away from the hospital or they don't notce ther
health condition.
In addition, e-health system causes little interruption to
For the health patients' daily activit
care
providers, after receiving the abnormal
signals ro
patients, appropriate treatment can be made, which saves medical resources.
Furthermore, without direct contact with medical or
other patients, the facilities, medical persoul
patients are unlikely to be infected with other
However, to
diseases
ensure the security and privacy of records
encounters a
lot of challenges patients' medical
1. How to achieve the
confidentiality and integrity of patients' informano
2. The security of wireless body area network,
3. The privacy and unlink
ability of patients' health status,
4. The
undeniability and
unlinkability of doctors' treatment,
TECHNICAL PUBLICATIONS" -An up thrust for knewledge
5-5
Application Building with loT
Applications
is
oTand
The location privacy of patients, the fine-grained access control of patients
5.
5.
cal record,
the mutual authentication between
patients and hospitals, etc.
l d be
would be useful to create an up-to-date bibliography on secure e-healthcare
It
systems
5 . 3 Lavatory Maintenance
1oT sensors provide low cost, scalable, efficient, low power, and integrated data
through all sub-networks. As more sensors are incorporated and data collection
period increases, the data becomes significantly large and hence the name "big
data"
. Statistics show that a bathroom is one of the most hazardous places. Following
market and we it in bathroom.
sensors are available in
c a n use
knowiedge
TECHNICAL PUBLICATIONS -
An up thrust for
5-6 Application uilding with lot
Applicetions
its
loT e n d ection and measurem
asurement
Water leakage
detection
of water usage
Flow
Sensor:
monitoring
and monitoring health corndi
Water water
s1eh tions,
ns. Unusual
7. data for saving
important
situation such as
uncon:
nsciousness
emergency
are indicate an 0nsciou
plumbing lea
water usage may
shower or
unnoticed
internal
akage.
a
before finishing f key requirements
requirements for
for loT
Sensor: One of key sensors is low
Harvesting maintenance of thoco
those sensors. Energy
8. Energy to minimize
consumption of electronic enero
power
generate
small a m o u n t enough or
for the,
their
energy harvestino
sensors
harvesting
sensor device or adjacent
from the
operation flow.
and hydraulic
pressure,
as sunlight
cleanliness monitoring system
aircraft lavatory
Example loT based after landing and durine
cleaned before take-ott,
The aircraft
lavatories are
require tw ight
Cleanliness Monitoring System,
. we
Data
)
ESP32 Third party
server analytics
Board
WIFil
(Adafruit cloud)
BLE
Negative
F/B using
Gas sensor touch sensor
IR Sensor#2
Fig. 5.3.1 Lavatory cleanliness monitoring system
eshold
G a s sensor is used to check methane level of lavatory compartment.
methane level for clean lavatory is identified and used as reference.
Ifany
The smell sensor is used to detect the toilet.
any unwanted gases present in
foul smell goes into the sensor, it creates a signal. All the signals are pas
nell and
through the NodeMCU microcontroller where the constraints ot
turbid water are checked.
gases
of
MQ2 gas sensor is an
alcohol gas sensor which can detect the presence
tneuthe
which contain alcohol traces in them. It is made out of tin in Paform o fstanni
TECHNICAL PUBLICATIONS" -
ollected
sensor data is quickly uploaded to the adafruit cloud storage before
at the airports.
and after landing
take-off
between collected real-time sensor data and threshold value
Baced on comparison
cas sensor aircraft support
staff is alerted for cleaning the lavatories. The alert
of
real-time methane level exceeds the threshold value.
is sounded when
5.4 Water Quality
collection of
In conventional systems,
the monitoring process involves the manual
Sample water from various regions, followed by laboratory testing and analysis.
ineffective, as this process is arduous and time-consuming and it
This process is
real-time results.
does not provide
to ensure the safe supply
The of water should be monitored continuously,
quality
.
Subscnibe Farmer
SPublish
23C
Sensor node
Publish temp 23'C
Publish pH 7.2 Cloud
computing
Publish Na MQTT
broker
Pond Database
Researcher
Data analysis
TECHNICAL PUBLICATIONS -
An up thrust for knowledge
loT and its Applications 5-8
Applicetion Building
with loT
.The system mainly consists of sensor node as publishers, and Rasnk
broker, and mobile client devices as subscribers. The sensor nodes y pi MOTT
are
small embedded devices, LoRa wireless intertace, and water
water quality
quality sensors, built with
water temperature sensor, pH sensor, and salinity sensor.
ie
Water quality sensor: The pH meter is used for the quality check if
if water
for use. is safe
Solar Cell 20 WP 12 V
Packet Size 17bytes
Transmission Interval
wwwwww.wwwwww.wwwwwww.wwwwwwwwwwuwwowwowsuw.ooowwwwwwww
60 seconds
www.w www
****wwwwwwwwwwwwwwwwwwwwwwwwwwwww.wwwwwwwwwwwww.ww**
5.5 Warehouse
Today, warehouses are more than storage inventory facilities. and
Many
better
organizations are therefore investing in loT-enabled warehouses 0
(WMS)
Automated Control Systems (ACS) and Warehouse
to improve their
Management systen
operational costs. efficiency by reducing p r o d u c t locations
loT enabled warehouses gives businesses real-time data on proau store
tes
transportation details, packaging, and routing. Due to these instant ensure
Fig. 5.1.1
loT and its Applications 5-10
pplication Building with
loT
.Using loT devices in warehouses enables businesses to detect rist
k and avoid
accidents that can create disruptions in the supply chain. loT oid
warehouses can monitor temperature conditions. In addition, data sensors in
vehicles, shipping conveyances and products can be combined
gathered from
to
counterfeiting, theft, and spoilage. duce
Fig. 5.5.1 shows.
1. Real time data received from sensors/beacons ensure that
actual inventom
levels are measured. bry
2. Real-time updates on inventory count,
alerts tor mismatch between
data in ERP and actual inventory in warehouse. inventor
nto
3. Restocking process becomes more efficient and stock out losses are avoided
4. Automated navigation within warehouse
5. End-to-End visibility on inventory
5.6 Retail
5.6.1 Inventory Management
Retail involves the sale of
goods from a single point (malls, markets, department
stores etc) directly to the consumer in small
quantities for his end use.
Retail is a
challenging business but the pressures of
are
resulting in today's economic conditions
evern more selective
The effect of internet of
consumer shopping and spendin8
things on
inventory management is the next huge thing in
progress when it comes to Business Process
In
Management (BPM).
typical business, the process of ordering,
any
good is a day to day storing, tracking and managus
this process
requirement. with all high investmernt top-tier busineb
As
becomes more complex with
demand. increasing amount of Suppy and
nis
process involves huge
transaction of monetary resources and hence "
impervious that a high preference is are
given to this in a BPM. Inventories
mismanaged can create significant o a
financial problems for a business, leadu
inventory shortage.
Existing technologies such as bar
(RFID) alreadylet retailers monitor coding and Radio-Frequeney
their inventories.
loT will enable this to data
be taken to the more
coming in the monitoring systems and next level evel with significantly
signiicanly hain
P p l y chain.
TECHUIdL
its
Applications
5- 11
loT and Application Building with loT
This considerably improve supply chain efficiencies and enable leaner
nventories. retailers such
ventories. Large retail as Walmart
and inventory management.
are
already using IoT for supply chain
Near Field
Near Field Communication (NFC) technology is a standards-based wireless
communication technology that allows data to be exchanged between devices that
are a few centimeters apart.
. NFC operates at 13.56 MHiz and transfers data at to 424
Kbits/second. up
.NFC is available as standard functionality in many mobile phones and allows
consumers to perform safe contactless transactions, access digital content, and
connect electronic devices simply.
An NFC chip in a mobile device can act as a card or a reader or both, enabling
consumer devices to share information and to make secure payments quickly.
Using smart phone applications, payments can be made using a simple tap or
waving the card within the proximity.
Service providers can integrate payment option into smart phones using an NFC
tag embedded inside the device. Apple pay, google wallet (android pay) and
smsung pay are the most popular among smart phone payment systems.
Data transfer using smart device are possible using NFC technology like android
Deam. Two users can share documents, photos, resumes and business cards by just
2. If a face is found, we
apply facial landmark detection and extract the
eye
regions:
Each
by 6 (x, y)-coordinates, starting at the left-comer of
represented the
Ve i tne
you were looking at the person), and then working clockwise around
Femainder of the
region:
PA
po Ps
5.7.1 Eye Aspect Ratio (EAR)
Fig.
EAR
P2-P6 * P3-Ps
2 P1-P4
The system analyses the driver's consistency while driving in the form ot vznes
nose,
measuring the coordinates ot the right and
mouth, left and right ear
brow. The human visual
visual content
TECHNIGAL PUR
6 Arduino and Raspberry Pi
Syllabus
Arduino: Architecture, Programming and
Application.
Raspberry Pi: Architecture, Programming andApplication.
Contents
6.1 Arduino Architecture
6.2 Raspbemy Pi
a
online.
LED, publishing something
be powered via the USB connection or with an extemal
nal
T h e Arduino Uno can
is 3.3 Volt
Operating input voltages
It uses EEPROM, SRAM and Flash memory
UART
I t also support USB and
O0000000 O0000000
0
21 09 8 7 6 5 43 2 1
Digital
Arduino
USB
http://arduino.berlios.de
8 D1
TIMIUN
Q1
ICSP
IC1
Power Analog in
5V GND 9V 0 1 2 3 4 5
o00
Fig. 6.1.1: Arduino Board
.Digital Ground f o r d i g i t a l1 O
13 (green)
Digital Pins 2 These pins cannot be used ation
Reset Button S 1
ln Pins 0
-
5
Analog
Ground Pins
Power and
External Power Supply In (9-12VDC) X1
Toggle External Power and USB Power (place jumper on two pins closest to
desired supply)
-
SV1 (purple)
.USB
Digital Pins
In addition to the specific functions listed below, the digital pins on an Arduino
board can be used for general purpose input and output via the pinMode()
digitalRead(), and digitalWrite( ) commands.
Each pin has an internal pull-up resistor which can be turned on and off using
digitalWrite( ), when the pin is configured as an input. The maximum current per
pin is 40 mA.
(TX) TTL serial data.
Serial: 0 (RX) and1 (TX). Used to receive (RX) and transmit
connected to the corresponding pins of
On the Arduino Diecimila, these pins are
it's off.
Analog Pins
listed below, the analog innu+
I n addition to the specific functions ns support
10-bit analog-to-digital conversion (ADC) using the analogRead() function.
Most of the analog inputs can also be used as digital pins: analoe in ut as
digital pin 14 through analog input
5 as digital pin 19.
Analog inputs' 7
the Mini and BT) cannot be used as digital pins.
(present on
Power Pins
VIN (sometimes labelled "9 V"). The input voltage to the Arduino board when ie.
it's
using an external power source.
You can supply voltage through this pin, Or, if supplying voltage via the power
jack, access it through this pin. Note that different boards accept different input
voltages ranges, please see the documentation for your board. Also note that the
LilyPad has no VIN pin and accepts only a regulated input.
5 V: The regulated power supply used to power the microcontroller and other
components on the board. This can come either from VIN via an on-board
regulator, or be supplied by USB or another regulated5 V supply.
3V3: (Diecimila-only) A 3.3 volt supply generated by the on-board FTDI chip.
.GND: Ground pins.
Other Pins
AREF: Reference voltage for the analog inputs. Not currently supported by the
Arduino software.
Reset Bringthis line LOW to reset the microcontroller.
reset button to shields which block
Typically used to add a
the one on the board.
I t has 14 digital
6 analog
input/output pins (of which 6 can be used as PWM outpu
inputs, 16 MHz crystal oscillator, a USB connection, a
a an
6.2 Raspberry Pi
Versions RemarkS
anno n *********** *****************************************
Raspberry Pi 1 The original Raspberry Pi had 256 Mb of RAM, which increased to 512 MB
in a later revision.
.It has a 26-way GPIO connector --
Pi Zero .The Pi Zero includes the GPIO connector, but the header pins are not
Raspberry Pi2.The Raspberry Pi 2 swapped the single-core processor for a much faster
DSI display
connector
SD card slot
(back of board) USB 2.0
HDMI OUT
Fig. 6.2.1 (a) : Raspberry Pi circuit board
USB
LEDs
****
This jack is used for providing audio output to old television along with the
RCA jack for video
GPIO Pins Both models have a total of 26 GPIO pins, organized into one pin header,
*********wwwwwwwweenwwwwwwwwwwwwwww******
www.wwwwww
The Raspberry Pi comes with aset of 26 exposed vertical pins on the board. These
pins are a General Purpose Input /Output interface that is purposely not linked to
any specific native function on the Raspberry Pi board.
Raspberry Pi P1 head
PIN# Name Name PIN#
3.3VDC powersooe
OON5.0 VDC power
8 SDAO(2C) OO DNC
9 SCLO120) OO 0V (Ground)
7 GPIO7 TxD
DNC RxD 16
0 GPIo0 OO5 GPI01
2 GPIO2
889888998geogg
OO DNC
3 GPI0 3 O GPI04
DNC OO GPIO5
12 MOSI O 8 DNC
13 MIS0 O ON GPIO6
14 SCLK OO | CEO 10
DNC
& CE 11
is
IoT and 6-9
ino and Raspbem
ad.
ea the GPIO pins are there
exXplicitly for the end
har access directly to the
board for the user to have low-level
eDeripherals, LCD display
screens and
purposes of
attaching other hardware
other hardware devices
The Status LEDs to the Pi.
Status Color
LED Functions
ACT Green Lights when the SD card is
accessed (marked OK on earlier boards)
PWR Red Hooked up to 3.3 V
power
FDX Green On ifnetwork adapter is full duplex
INK Green Network activity light
100 Yellow On if the network connection is 100
a v w wwwwwwww
Mbps
.The Raspberry Pi draws its power from a
microUSB
requires port and a
microUSB-to-AC adapter. Because the Pi is a micro
computer and not simply a cell
phone getting a battery topped off, you need to use a high
stable power delivery that
quality charger with
provides a cornsistent 5 V with at least 700 mA
minimum output for older model units and 2.5 A for the Pi 3.
Distributions
1. Debian7
2. Raspbian
3. Arch Linux ARM 4. QtonPi
shown in
eault command prompt on the Pi consists of four components
Fig. 6.2.3.
Raspbian is e desired operating system for the Raspberry Pi. In order tob
do you
b and install the operating system onto our Raspberry 1
Rasp
pDlan, Win32Disklmager and USB memory card reader
knowledge
TECHNICAL PUBLICATIONS -
An up thrust for
loT end its Applicetions 6- 10 Arduino and
taspbery P
and
1. Download both Raspbian
somewhere
Win32Disklmager and save
Working
easily accessible username directory
2. Plug the USB memory card reader into
pi@raspberrypi
your computer
3. Open Win32DiskImager hostname type
after
4. Find the location of the image file and this
the memory card
.Now it is time to turn on our Raspberry Pi. When the memory card, HDMI lead
ead,
Ethernet cable, mouse and keyboard are plugged in, plug in the power lead.
As soon as you do this. You screen should be black and filled with white textt
This will be visible every time you turn on your raspberry pi.
aspberrypi login: pi
Passunrd
ast lugin: Tue Auy 21 21:24:59 EDT 2012 un tty1
Linux raspberrypi 3,1.9* 1168 PREEMPT Sat Jul 14 18:56:31 BST 2012 arnuél
The prograns inciuded uith the Debian GNU/LinmIx systen are free softuare
he exact distribut ion terns for each proyran are described in the
ind iuidua files in /usr/share/doc/w/copyright
pieraspberrmpi ,$
CSelect
1. Serial
serial peripherals for serial communication.
It uses
.Transmit (Tx) and Receive (Rx) pin is used for serial communication.
register (SPIEMU)
3. 16-bit Transmit data register (SPIDATO) and 16-bit Transmit data and rr
selection register (SPIDAT1)
4. 8-bit baud clock generator
5. Serial clock (SPICLK) I/O pin
6. Slave in, master out (SPISIMO) I/Opin
7. Slave out, master in (SPISOM1) V0 pin
11. Programmable
clock phase (delay or no delay)
clock polarity (high or low)
12. Programmable
13.Interupt capability
14.DMA support (read/Write synchronization events)
15. Up to 66 MHz operation
Configured as Slave.
SCLK: This pin is used to output the cdock with respect to which the SPI transfers
data or receive clock in case of Slave.
SCLK
MOSI
SPI Master MISO SPI Slave
SS
Flg.6.3.1: SPI
SCK master device will generate a pulse and the data will be synchronized in both
14ster
E r and slave devices. There are four different clock types to define sP
C,depending
hese
on what the SCK polarity and phase may be. It must ensure
signals between the master and slave devices compatible with each other.
Master sends out clocks and chip selects. Activates the slaves it wants to
communicate with.
MOSI
MISO
Clock
SS
. P Cis a communication protocol that the Raspberry Pi can use to speak to other
embedded devices (temperature sensors, displays, accelerometers, etc).
between microcontrollers and
.1cis a useful bus that allows data exchange
peripherals with a minimum of wiring.
ICis a two wire bus, the connections are called SDA (Serial Data) and SCL (Serial
Clock). EachIC bus has one or more masters ( Raspberry Pi) and one or more
standard.
4 Serial Rx and Tx pins for communication with serial peripherals.
Pi
Controlling
LED with Raspberry
6.4.1 Pi. The LED will initiall.
LED to Kaspberry ly
.Fig 6.4.1
shows diagram of connecting at power-on.
are initialized
as inputs
the GPIO pins
be off because
A library that will let us control the GPIO n s.
.Install Python 2 library Rpi.GPIO.
Install commands:
ast
1NNTHI
CSttCAMERA
GPIO 27
GPIO17
GPIO 4
TECHNICAL PUBLICATIONS -
Circuit
.Simple LED C ir is shows be
GPIO pin-
Vcc 3.3 V-
Anode 200 22
2002
Cathode
GPIO pin-
Fig. 6.4.2
.Current flows from the anode (+) to cathode (). Anode is longer pin and cathode
is shorter pin.
software and create a New file. Save it
.Open up IDLE, the Python programming
as led.py and input
the code from the code listing. What the code does is first tell
connect to the GPIO pins, by
Pythonto use the GPIO module so w e carn
importing the module.
between commands.
We then import the time module so w e can create a delay
number they are on the board
We then tell the code to treat the GPIO pins as the
and to turm the seventh pin into an output.
and off. Once it's
between True and False so that it turns the pin o n
We alternate Done' into IDLE and finally
turn off
cycled a few times, it will print the message
the GPIO pins.
Fig. 6.4.3
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7, GPIO.OUT)
GPIO.output{7,True)
time.sleep(1)
GPIO.output(7,False)
time.sleep(1)
GPIO.output(7,True)
time.sleep(1)
GPIO.output(7,False)
print'Done"
GPIO.cleanup0
Task 1 Turn LED for 2 seconds and off for 1 second,
on
loop forever. Code is given
below
(In this example, we use diagram (b), i.e. controlling the LED by controlling the
voltage at the anode (+)).
import RPi.GPIO as GPIO
import time
def main( ):
GPIO.cleanup()
GPIO.setmode(GPIO.BOARD) # to use Raspberry Pi board pin numbers
GPIO.setup(11, GPIO.OUT) # set up GPIO output channel
while True
GPIO.output(11, GPIO.LOW) # set RPi board pin 11 low. Tun off LED.
time.sleep()
LED.
GPIO.output(11, GPIO.HIGH) # set RPi board pin 11 high. Turn on
time.sleep(2)
main( ) lay
Example: Display digit on 7-segment LED. It is most direct way tocontro
1. Connect
pin 3/8 of 7-seg-LED to Vcc
GPIOinput (17)
"true".
# Hold down the button, run the command again. The output should be
GPIOinput(17
Vcc 3.3 V
GPIO input 10 k2
pin
pull up resistor
Fig. 6.4.4
DS (DI5PL AY
v4swwoIso
ETHERNE
USB 2x
***** ******
4. On the other side of the LDR sensor place a wire leading back to the Raspbery
Pi. Hook this to pin number 7.
board.
5. Finally place the capacitor from the wire to the negative rail on the Dica
Make sure you have the negative
pin of the capacitor in the negative ra
and its
oT
Arduinoand
6.4.6 shows circuit
Raspberry Pi
Fig. diagram for above configuration.
of events
sequence
The
the GPIO pin as an
1. Set
output and set it Low. This
3.3V (Pin 1)
discharges any charge in the
2.2 k
R1
capacitor and ensures that
both sides of the capacitoor
are 0 V. LDR
2. Set the GPIO pin as an GPIO
input. This starts a flow of C1
current through the resistors 14F GND (Pin 6
and through the capacitor to
ground. The voltage acro Fig. 6.4.6: Circuit diagram for LDR
the capacitor starts to rise. The
time it takes is
LDR. proportional to the resistance of the
3. Monitor the GPIO pin and read its
value. Increment counter while we wait.
a
4. At some
pointthe capacitor
voltage will increase enough to be considered
High by the GPIO pin as a
level seen
(approx 2v). The time taken is proportional to the light
by the LDR.
.Setthe GPIO pin as an
output and repeat the process as
required.
Python Code
#l/usT/local/bin/python
#Read an
analogue sensor with a single GPIO pin
import RPiGPIO
# Tell
as GPIO, time
the GPIO
library to use
#Broadcom GPIO references
GPIOsetmfurnctis
Define ode(GPIO.BCM)
nction
def RCtime (PiPin):to easure charge time
measurement =0
# Discharge capacitor
GPIO.setup(PIPin, GPIO.OUT)
GPIO.output(PiPin, GPIO.LOW)
TECHNICAL PUBLICATIONS- An up thrust for knowledge
Arduino
loT and its Applicetions
6-22
Raspbery
time.sleep(0.1)
GPIOsetup(PiPin, GPIO.IN)
acro0Ss
#Count loops until voltage
GPIO
#capacitor reads high on
== GPIO.LOW):
while (GPIO.input(PiPin)
measurement += 1
return measurement
computer monitor or TV using HDMI and uses a standard keyboard and mouse. It can
Ost of operating systems, such as Raspbian, Android, Windows 10, IoT Core,
etc.
eiwwwwwwwwwiwwwwwwww.www.ovvvvwwwwwwwvevevwe wwww
Ethernet port
No Ethernet port 10/100Ethernet
Broadcom BCM2837BO Broadcom BCM2837B0
SoC Type
Number of Cores
4
is Python
?
What
a5 language with integrated
an object-oriented,
high-level programming
APythonis for web and app development.
dynamic semantics primarily
features of Python.
explain
List and
Q6
Ans.: F e a t u r e s :
m o r e productive
coding
ython allows for
a
framework.
like C# and Java. web application
source
Syllabus
Various security issues and need, architecture, requirement, challenges and algorithms
Contents
7.1 Various Security Issues and Need
7.2 Security Architecture
7.3 Secuity Requirement
7.4 Challenges
7.5 Short Questions and Answers
(7-1)
7-2 oSecunty
Applications
loT and its
Issues
and Need
Security obiects and
of connected
Various
7.1 refers to a concept
thes of
evices of
Internet of Things
(loT) wireless. The popularity of loT or
Internet
.The
over the Internet
wired o r
these technologies are used stor
all types rapidly, as
increased and busineee
education, and
has transportation,
transportation,
of Things communication,
including
purposes,
Risks
nd smart home
can be
The security of the Internet of
Things, the following principles e
.Fig. 7.2.1 shows loT security architecture. (See Fig. 7.2.1 on next page.)
IoT systems are often highly complex, requiring end-to-end security solutions that
span cloud and connectivity layers, and support resource-constrained loT devices
that often aren't powerful enough to support traditional security solutions.
Application layer support user services. This layer helps users access IoT through
the interface using PC, mobile equipment etc. This layer also support secure
communication protocol and authentication protocols.
Network layer support wired and wireless communication protocol and
technology. This layer is responsible for dependable broadcast of data and
information from the below layer.
Sensors are the monitors that pick up data and relay it for further analysis.
Actuators are devices that act as robotic controls. Many IoT attacks have used
actuators, such as printers, as launch points into a business's network.
of the
An IoT security architecture is a blueprint that illustrates all components
lOT infrastructure for all IoT projects and details how to secure each component.
misconfigurations.
Such attacks frequently exploit many weaknesses, including but not limited to
Fig. 7.2.1
Attackers often use those weaknesses to
install backdoors, sniffers, data
software, file transfer capabilities to extract collection
and sometimes even sensitive information from the system,
Command & Control
system behaviour. (C&C) infrastructure to manipulate
7.3 Security Requirement
The key requirements for any loT
security solution are :
1. Device and data
and
security, including authentication of devices and confidentauy
integrity of data.
2.
Implementing and running security
3. Meeting operations at loT scale.
compliance requirements and
4.
Meeting performance requirements as requests.
per the use case.
Application layer: Verification and user's
Support layer: Various encryption confidentiality
.Network layer: Distributed algorithms
denial of service attackk
Physical layer: Authentication.
7.4 Challenges
The security challenges are as follows:
a. Devices are not reachable : Most of the time a device is not connected.
b. Devices can be lost and stolen : Makes security difficult when the device is not
connected.