IoT & Smart Devices

Amine BENDAHMANE

PhD student on AI & Robotics

Uconf 2.0

What's IoT?

Internet of Things

Objects that can send/reviece data over the Internet

What are

Smart Devices?

Adapt its functionalities

To improve the user's experience

Is your Smartphone really smart?

Does it need to be connected to be smart?

Project Jarvis

Smart Home you said?

Let's see a demo...

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)

SmartDevice example

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

    if (status == '1'):
        # Turn light ON
        GPIO.output(lamp, 1)
        now = datetime.datetime.now()
        
        # Choose a suitable delay according to the current time and old data
        predicted_delay = model.predict([now.hour])
        time.sleep(predicted_delay)

        # Turn light OFF
        GPIO.output(lamp, 0)
        status = urllib2.urlopen("http://udevcommunity.com/uconf2-iot-test
            /change_lamp_status.php")

    elif (status == '0')
        GPIO.output(lamp, 0)

Code available at

https://github.com/UdevCommunityDev/uconf2-smart-lamp

Thank you!

github.com/amineHorseman

bendahmane.amine@gmail.com

IoT & Smart Devices [UConf2.0 talk]

By Amine Bendahmane

IoT & Smart Devices [UConf2.0 talk]

What's the difference between an IoT and smart devices? are "connected" devices necessarily "smart"?

  • 297