Introduction to IoT

Amine BENDAHMANE

PhD student on AI & Robotics

What's IoT?

Internet of Things

Objects that can send/reviece data over the Internet

How to create an

IoT plateform?

1- Acquire data from real world

2- process data localy

3- Connect to the server or to other devices

4- Store data in the server / cloud

5- Process data in the server

6- Send commands to devices if needed

7- Display insights in the dashboard

Simple IoT example

import RPi.GPIO as GPIO
import urllib2

# init
lamp = 40
GPIO.setmode(GPIO.BOARD)
GPIO.setup(lamp, GPIO.OUT)

while True:
    # get the lamp status from the server
    status = urllib2.urlopen("http://udevcommunity.org/
        uconf2-iot-test/get_lamp_status.php").read()

    # Turn ligh ON/OFF according to the server response
    if (status == '1') # ON
        GPIO.output(lamp, 1)
    elif (status == '0') # OFF
        GPIO.output(lamp, 0)

Server side

<?php

$status = file_get_contents('lamp_status.txt');
print intval($status);

?>
<?php

if ($buttonState == 0)
    file_put_contents('lamp_status.txt', '1');
else file_put_contents('lamp_status.txt', '0');

?>

1- GET request

2- When button is clicked

IoT implications to keep in mind

Thank you!

bendahmane.amine@gmail.com

AmineHorseman

Made with Slides.com