hacking into iot using javascript

22

Upload: sajan-john

Post on 16-Apr-2017

644 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Hacking into IoT using JavaScript
Page 2: Hacking into IoT using JavaScript
Page 3: Hacking into IoT using JavaScript

Yesterday, Internet changed our life. Today IoT is doing it all over

again..

Page 4: Hacking into IoT using JavaScript

22 Billions of devices are expected to be part of IoT by 2020 – Gartner

Page 5: Hacking into IoT using JavaScript

Game Changers

Page 6: Hacking into IoT using JavaScript

Is this enough to get there?

Page 7: Hacking into IoT using JavaScript

Hack the IoT world with JavaScriptSajan John | Twitter:@sajanjohn

Page 8: Hacking into IoT using JavaScript

Idea Source: http://www.odetocode.com

Page 9: Hacking into IoT using JavaScript

Idea Source: http://www.odetocode.com

Page 10: Hacking into IoT using JavaScript

Why JavaScript?

1. Most popular language in the world today!

2. JavaScript is everywhere now!

3. Asynchronous

4. Easy learning curve

5. A language that can be used at back/middle/front-end layers

6. Light foot print

7. Efficient Memory Management

8. Node.Js and NPM

Page 11: Hacking into IoT using JavaScript

Node.js + arduino = magic!

Page 13: Hacking into IoT using JavaScript

Frameworks for hardware programming

Johnny-Five.js Cylon.js

Page 14: Hacking into IoT using JavaScript

Ever growing community

Write your own framework

Using Node Serial Port and Node Web Socket.

Page 15: Hacking into IoT using JavaScript

Write in JS and control Arduino Use Firmata Protocol to

communicate with Arduino Can be used with Accelerometer,

Button, Compass, Led, Joystick, Motor, (Ultrasonic) Ping, Proximity IR, Range IR, Sensor, Servo, Sonar

Running on a node.js server Excellent for internet and cloud

programming

Johnny-Five

Page 16: Hacking into IoT using JavaScript

Demo – 1 : Let there be light!

Page 17: Hacking into IoT using JavaScript

Install Arduino IDE Install Node.js npm install johnny-five Upload Firmata to your arduino

Open Arudino IDE Go to File > Examples >

Firmata > StandardFirmataJohnny-Five Demo

var five = require("johnny-five"), led, board;board = new five.Board();board.on("ready", function(){

led = new five.Led(12)led.strobe(1000);

})

Page 18: Hacking into IoT using JavaScript

Road Ahead

- Classes - Modules- Lexical block scope (let,

constant)- Concise method - Lambada operator

- Binary and Octal literals

- Mobile Controlled- NUI driven – Gesture /

Voice - Wearable- Listening Walls

- Learning Algorithms

ES 6

IoT

Page 19: Hacking into IoT using JavaScript

Demo – 2 : Smart Home concept

Page 20: Hacking into IoT using JavaScript

Removed the video due to size restriction. You can watch the poorly recorded back up demo herehttps://www.youtube.com/watch?v=YMIduKslE7M

Page 21: Hacking into IoT using JavaScript

Remote car is driven using JavaScript

When the car enters the garage lights will turn on automatically and turn off when it leaves the garage – using IR sensors

Chrome speech synthesizer integrated for voice commands

Socket used for mobile / remote control of appliances

Tech stack – Node.Js, Socket.Io, Johhny-Five, Express Js , Arudino Uno, Raspberry Pi, IR Sensors and Relays

Smart Home Demo

Page 22: Hacking into IoT using JavaScript

Thank You