9
#ISSlearn (Total Slides=17) T:\LearningDay2016\IoT.pptx Internet of Things Tiny Components, Big Possibilities Derek Kiong 15 July 2016 1 © 2016 National University of Singapore. All Rights Reserved #ISSlearn (Total Slides=17) T:\LearningDay2016\IoT.pptx What is IoT? Network of things with network connectivity has embedded electronics, software, sensors, actuators may collect and/or exchange data eg -- lamp, proximity sensor, camera, vehicle, people etc 2 © 2016 National University of Singapore. All Rights Reserved

NUS-ISS Learning Day 2016 - Tiny Components But Big Possibilities

Embed Size (px)

Citation preview

Page 1: NUS-ISS Learning Day 2016 - Tiny Components But Big Possibilities

#ISSlearn

(Total Slides=17) T:\LearningDay2016\IoT.pptx

Internet of Things �Tiny Components, Big Possibilities

Derek Kiong

15 July 2016

1© 2016 National University of

Singapore. All Rights Reserved

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

What is IoT?

� Network of things with network connectivity

� has embedded electronics, software, sensors,

actuators

� may collect and/or exchange data

� eg -- lamp, proximity sensor, camera, vehicle,

people etc

2© 2016 National University of

Singapore. All Rights Reserved

Page 2: NUS-ISS Learning Day 2016 - Tiny Components But Big Possibilities

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

Application of IoT

� By harnessing ICT, networks and data, the Smart Nation vision seeks to support better living, create more opportunities, and support stronger communities.

3© 2016 National University of

Singapore. All Rights Reserved

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

Example �ATM

4© 2016 National University of

Singapore. All Rights Reserved

Page 3: NUS-ISS Learning Day 2016 - Tiny Components But Big Possibilities

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

Example �Hospital Visitation System

5© 2016 National University of

Singapore. All Rights Reserved

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

Example �WiFi enabled SD Card

6© 2016 National University of

Singapore. All Rights Reserved

� WiFi hotspot/client

� Embedded Web server

Page 4: NUS-ISS Learning Day 2016 - Tiny Components But Big Possibilities

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

Example �Xiaomi action Camera

7© 2016 National University of

Singapore. All Rights Reserved

� WiFi hotspot/client

� Network API camera remote control

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

Raspberry Pi as Sensor Hub

8© 2016 National University of

Singapore. All Rights Reserved

Page 5: NUS-ISS Learning Day 2016 - Tiny Components But Big Possibilities

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

Raspberry Pi pin layout

9© 2016 National University of

Singapore. All Rights Reserved

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

Example actuators �Relays

10© 2016 National University of

Singapore. All Rights Reserved

Page 6: NUS-ISS Learning Day 2016 - Tiny Components But Big Possibilities

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

GPIO output

class Relay:

def __init__(self):

GPIO.setmode(GPIO.BCM)

GPIO.setwarnings(False)

self.pinList = [22,23,24,25]

def switch(self, switch, state):

pin = self.pinList[switch]

GPIO.setup(pin, GPIO.OUT)

if state == 0:

GPIO.output(pin, GPIO.HIGH)

else:

GPIO.output(pin, GPIO.LOW)

11© 2016 National University of

Singapore. All Rights Reserved

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

Example sensor �Motion Sensor

12© 2016 National University of

Singapore. All Rights Reserved

Page 7: NUS-ISS Learning Day 2016 - Tiny Components But Big Possibilities

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

GPIO input

class Sensor:

def __init__(self, pin):

self.pin = pin

GPIO.setmode(GPIO.BCM)

GPIO.setwarnings(False)

GPIO.setup(self.pin, GPIO.IN)

def getState(self):

return GPIO.input(self.pin)

def waitFor(self, event):

GPIO.wait_for_edge(self.pin, event)

13© 2016 National University of

Singapore. All Rights Reserved

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

GPIO input (event-driven)

def onStateChange(self, channel):

print "state change occurred"

def setEvent(self, event):

GPIO.add_event_detect

(self.pin, event, callback=self.onStateChange)

14© 2016 National University of

Singapore. All Rights Reserved

Page 8: NUS-ISS Learning Day 2016 - Tiny Components But Big Possibilities

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

Example �AD/DA converter

15© 2016 National University of

Singapore. All Rights Reserved

#ISSlearn(Total Slides=17) T:\LearningDay2016\IoT.pptx

Example �Text display

16© 2016 National University of

Singapore. All Rights Reserved

Page 9: NUS-ISS Learning Day 2016 - Tiny Components But Big Possibilities

THANK YOU ☺

[email protected]

17© 2016 National University of

Singapore. All Rights Reserved