More Related Content Similar to IoT Tutorial for Beginners | Internet of Things (IoT) | IoT Training | IoT Technology | Edureka (20) IoT Tutorial for Beginners | Internet of Things (IoT) | IoT Training | IoT Technology | Edureka 3. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What is Internet of Things?
4. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What is Internet of Things?
IoT Tutorial
GPS Tracking
Mobile Gyroscope
Adaptive Brightness
Voice Detection
VOICE
Face Detection
5. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What is Internet of Things?
IoT Tutorial
Connecting everyday things embedded with electronics, software and
sensors to the internet enabling them to collect and exchange data
6. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why do we need IoT?
7. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why do we need IoT?
IoT Tutorial
Cloud
IOT continuously monitoring your health
8. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why do we need IoT?
IoT Tutorial
Cloud
As any irregular condition is monitored, hospital is notified…
9. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why do we need IoT?
IoT Tutorial
Cloud
Quickly the ambulance is send to the patients location….
10. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why do we need IoT?
IoT Tutorial
Before ambulance arrives, all the facilities are ready for the patient based on his reports…
Prescriptions
Medicines
Operation Theater
11. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why do we need IoT?
IoT Tutorial
INTERACT
CONTRIBUTE
COLLABORATE
TO THINGS
to
&
12. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Benefits of IoT
13. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Benefits of IoT
Benefits of Internet of Things
IoT Tutorial
EFFICIENT RESOURCE UTILIZATION
MINIMIZING HUMAN EFFORT
SAVES TIME
DEVELOPMENT OF AI THROUGH IOT
IMPROVED SECURITY
14. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Features
15. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Features
IoT Tutorial
IoT lets us achieve the true potential of technology
CONNECT
ANALYZE
INTEGRATE
Connect various things to the IoT Platform
Analyze the data collected and use it to build
Business Intelligence
Integrate various models to improve user experience
16. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Features - Connect
IoT Tutorial
CONNECT
ANALYZE
INTEGRATE
Device Virtualization
1
Standardize integration of devices with the IoT enterprise
17. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Features - Connect
IoT Tutorial
CONNECT
ANALYZE
INTEGRATE
Device Virtualization
1
High Speed Messaging
2
Enable reliable, secure, and bi-directional
communication between devices and the cloud
18. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Features - Connect
IoT Tutorial
CONNECT
ANALYZE
INTEGRATE
Device Virtualization
1
High Speed Messaging
2
Endpoint Management
3
Manage device endpoint identity, metadata
and lifecycle states for all devices
19. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Features
IoT Tutorial
CONNECT
ANALYZE
INTEGRATE
Stream Processing
1
Real-time analysis of incoming data streams
with event aggregation, filtering, and
correlation
20. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Features
IoT Tutorial
CONNECT
ANALYZE
INTEGRATE
Stream Processing
1
Data Enrichment
2
Enrich raw data streams with contextual
information and generate composite streams
21. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Features
IoT Tutorial
CONNECT
ANALYZE
INTEGRATE
Stream Processing
1
Data Enrichment
2
Event Store
3
Query and visualize massive amounts of data
with integrated BI Cloud Service support and
enable big data analysis
22. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Features
IoT Tutorial
CONNECT
ANALYZE
INTEGRATE
Enterprise Connectivity
1
Dynamically dispatch critical IoT data and
events to applications and process flows
23. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Features
IoT Tutorial
CONNECT
ANALYZE
INTEGRATE
Enterprise Connectivity
1
REST APIs
2
API-based integration with Cloud apps and IoT
devices
24. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Features
IoT Tutorial
CONNECT
ANALYZE
INTEGRATE
Enterprise Connectivity
1
REST APIs
2
Command and Control
3
Send messages to devices from enterprise and
mobile apps, independent of device connectivity
25. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Raspberry Pi OS Installation
26. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Raspberry Pi OS Installation
The Raspberry Pi Foundation recommends the use of Raspbian, a Debian-based Linux operating system
RISC OS
FreeBSD
NetBSD
Plan 9 from Bell Labs
Windows 10 IoT
1
2
3
4
5
27. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Raspberry Pi OS Installation
1 Download NOOBS from www.raspberrypi.org
D o w n l o a d
N O O B S . z i p
28. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Raspberry Pi OS Installation
1 Download NOOBS from www.raspberrypi.org
E x t r a c t t h e
z i p f i l e & G o
t o R a s p b i a n
2 Extract the zip File
29. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Raspberry Pi OS Installation
1 Download NOOBS from www.raspberrypi.org
C o p y t h e s e f i l e s t o S D C a r d
2 Extract the zip File
3 Copy these file to a formatted SD card
30. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Raspberry Pi OS Installation
1 Download NOOBS from www.raspberrypi.org
2 Extract the zip File
3 Copy these file to a formatted SD card
4 Put in Raspberry Pi SD Card slot
31. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Raspberry Pi OS Installation
1 Download NOOBS from www.raspberrypi.org
2 Extract the zip File
3 Copy these file to a formatted SD card
4 Put in Raspberry Pi SD Card slot
5 Follow the installation instructions
33. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Demo
IoT Tutorial
To build a Weather Detection System to get real-time weather metrics live onto mobile notifications
Problem Statement
SenseHat Board will
measure weather
metrics of Temperature,
Humidity & Pressure
onto Raspberry Pi
1
We will use Raspberry Pi
to transfer the weather
data and display the
results on the SenseHat
board
2
We will use Instapush
API and Python Script to
push these notifications
across the internet
3
Figure: Three steps to build weather detection system
34. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Demo
IoT Tutorial
Assembling SenseHat on
Raspberry Pi
35. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Demo
IoT Tutorial
import pycurl, json
from StringIO import StringIO
import RPi.GPIO as GPIO
from sense_hat import SenseHat
import time
from time import asctime
sense = SenseHat()
sense.clear()
Importing Sense Hat
Importing Time
36. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Demo
IoT Tutorial
cold = 30
hot = 40
pushMessage = ""
#Displaying numbers
OFFSET_LEFT = 1
OFFSET_TOP = 2
NUMS =[1,1,1,1,0,1,1,0,1,1,0,1,1,1,1, # 0
0,1,0,0,1,0,0,1,0,0,1,0,0,1,0, # 1
1,1,1,0,0,1,0,1,0,1,0,0,1,1,1, # 2
1,1,1,0,0,1,1,1,1,0,0,1,1,1,1, # 3
1,0,0,1,0,1,1,1,1,0,0,1,0,0,1, # 4
1,1,1,1,0,0,1,1,1,0,0,1,1,1,1, # 5
1,1,1,1,0,0,1,1,1,1,0,1,1,1,1, # 6
1,1,1,0,0,1,0,1,0,1,0,0,1,0,0, # 7
1,1,1,1,0,1,1,1,1,1,0,1,1,1,1, # 8
1,1,1,1,0,1,1,1,1,0,0,1,0,0,1] # 9
Displaying numbers on
SenseHat
37. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Demo
IoT Tutorial
# Displaying a single digit (0-9)
def show_digit(val, xd, yd, r, g, b):
offset = val * 15
for p in range(offset, offset + 15):
xt = p % 3
yt = (p-offset) // 3
sense.set_pixel(xt+xd, yt+yd, r*NUMS[p], g*NUMS[p], b*NUMS[p])
# Displays a two-digit positive number (0-99)
def show_number(val, r, g, b):
abs_val = abs(val)
tens = abs_val // 10
units = abs_val % 10
if (abs_val > 9):
show_digit(tens, OFFSET_LEFT, OFFSET_TOP, r, g, b)
show_digit(units, OFFSET_LEFT+4, OFFSET_TOP, r, g, b)
Displaying numbers
on SenseHat
38. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Demo
IoT Tutorial
temp = round(sense.get_temperature())
humidity = round(sense.get_humidity())
pressure = round(sense.get_pressure())
message = " T=%dC, H=%d, P=%d Millibars " %(temp,humidity,pressure)
appID = "59bb6e6ba4c48a1cd674e33d“ #Adding Instapush Application
appSecret = "fd127d824390296b5f84818cddafeebe“# Add your Instapush Secret Key
pushEvent = "TempNotify"
c = pycurl.Curl()
c.setopt(c.URL, 'https://api.instapush.im/v1/post’) # Setting API URL
c.setopt(c.HTTPHEADER, ['x-instapush-appid: ' + appID,
'x-instapush-appsecret: ' + appSecret,
'Content-Type: application/json'])
buffer = StringIO() # Capture response from push API call
Getting
weather
metrics
Validating
Instapush
39. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Demo
IoT Tutorial
def pushmessage():
json_fields = {}
json_fields['event']=pushEvent
json_fields['trackers'] = {}
json_fields['trackers']['message']=pushMessage
#print(json_fields)
postfields = json.dumps(json_fields)
c.setopt(c.POSTFIELDS, postfields)
c.setopt(c.WRITEFUNCTION, buffer.write)
c.setopt(c.VERBOSE, True)
Defining
notification
message
40. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Demo
IoT Tutorial
while True:
temp = round(sense.get_temperature())
humidity = round(sense.get_humidity())
pressure = round(sense.get_pressure())
message = ' T=%dC, H=%d, P=%d ' %(temp,humidity,pressure)
time.sleep(4)
log = open('weather.txt',"a")
now = str(asctime())
temp = int(temp)
show_number(temp, 200, 0, 60)
temp1 = temp
log.write(now+''+message+'n')
print(message)
log.close()
time.sleep(5)
41. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
IoT Demo
IoT Tutorial
if temp >= hot:
pushMessage = "It is hot: " + message
pushmessage()
c.perform()
# Capture the response from the server
body = buffer.getvalue()
pushMessage = ""
elif temp <= cold:
pushMessage = "It is cold: " + message
c.perform()
# Capture the response from the server
body = buffer.getvalue()
# Resetting the buffer
buffer.truncate(0)
buffer.seek(0)
c.close()
GPIO.cleanup()
42. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Session In A Minute
What is IOT? Why IOT? Benefits Of IOT
Features of IOT Raspberry Pi Installation Demo
IoT Tutorial