320 likes | 1.79k Views
A look at where the market of the Internet of Things is and how technologies like Node.js (JavaScript) and the Intel Edison are making it easier to create connected solutions. <br><br>Learn more at https://losant.com. <br><br>The major topics include: <br>* What is the Internet of Things <br>* Where is IoT Today <br>* 4 Parts of IoT (Collect, Communicate, Analyze, Act) <br>* Why JavaScript is Good for IoT <br>* How Node.js is Making a Dent in the Internet of Things <br>* What npm Modules are used for Hardware (Johnny-Five, Cylon.js, MRAA) <br>* What is the Intel Edison <br>* How to Best Work with the Edison <br>* Tips for Edison (MRAA, Grove Kit, UPM) <br>* Where the World of JavaScript and IoT is Going.
E N D
NODE.JS & THE INTERNET OF THINGS CHARLIE KEY @zwigby LOSANT @LosantHQ 1.28.2016
WHO AM I? CHARLIE KEY CEO & Co-Founder Losant PREVIOUSLY CEO & Co-Founder Modulus 2
Losant provides a complete developer platform to quickly, securely, and easily build complex connected solutions. CONNECT ANALYZE REACT Make data-driven decisions in real-time. Connect and manage thousands of devices. Turn raw data into useful insights.
WHAT IS THE INTERNET OF THINGS? 4
“THE INTERNET AS A NETWORK HAD THE POTENTIAL TO BECOME LIKE A NERVOUS SYSTEM IF WE ADDED SENSING CAPABILITY.” KEVIN ASHTON P&G, UK (1999) – ASSISTANT BRAND MANAGER, OLAY
IoT – THE INTERNET OF THINGS IoT is a term that represents a collection of ideas, devices, and processes. Each thing is represented by a device or sensor. These things are usually working together to create larger solutions by sending and reacting to data from an ecosystem. 6
IT’S ABOUT ADDING VALUE AND SOLVING PROBLEMS- LIVES BUSINESSES CUSTOMERS
WHY DOES IoT MATTER? NUMBER OF CONNECTED DEVICES 25 20 billions of devices 15 10 TODAY 5 0 2014 2015 2016 2017 2018 2019 2020 http://www.gartner.com/newsroom/id/3165317 8
THE SMART HOME PRESENCE SENSOR SMART APPLIANCES PHILIPS HUE BULBS NEST THERMOSTAT HOME SECURITY SMART OUTLETS
MANUFACTURING AUTOMATED SMART DELIVERY REMOTE MONITORING MOTOR SENSOR TEMERATURE SENSOR HUMIDITY SENSOR PRESENCE SENSOR
THE SMARTER SELF BREATHING SENSOR FITBIT HEART RATE LUMO RUN SHORTS SMART RUNNING SHOES
THE IoT LIFECYCLE COLLECT COMMUNICATE ANALYZE ACT 13
COLLECT Devices and sensors are collecting data everywhere. HOME CAR OFFICE MFG PLANT 14
COMMUNICATE Sending data and events through networks to some destination A CLOUD PLATFORM PRIVATE DATA CENTER HOME NETWORK 15
ANALYZE Creating information from the data MACHINE LEARNING BUILDING REPORTS FILTERING / PAIRING IT DOWN 16
ACT Taking action based on the information and data COMMUNICATE W/ ANOTHER MACHINE (M2M) SEND A NOTIFICATION (SMS, EMAIL, TEXT) TALK TO ANOTHER SYSTEM 17
JAVASCRIPT + IoT Empowering everyone to build a more connected world.
WHY JAVASCRIPT? The current toolsets are hard to learn and use. Low Level languages mean more development time and issues. 19
WHY NODE.JS? npm 231643 total packages 48% of developers are using Node.js at IoT companies 20
SUPPORTED HARDWARE INTEL GALILEO LILINO ONE BEAGLEBONE BLACK INTEL EDISON RASPBERRY PI TESSEL 2
SUPPORTED COMMUNICATION MQTT AMPQ npm install mqtt npm install ampq HTTP STOMP npm install request npm install stomp-client XMPP CoAP npm install node-xmpp-client npm install coap and so many more… 22
NODE.JS LIBRARIES JOHNNY-FIVE var Cylon = require("cylon"); Cylon.robot({ connections: { arduino: { adaptor: 'firmata', port: '/dev/ttyACM0' } }, devices: { led: { driver: 'led', pin: 13 } }, work: function(my) { every((1).second(), function() { my.led.toggle(); }); } }).start(); var five = require("johnny-five"); var board = new five.Board(); board.on("ready", function() { var led = new five.Led(13); led.blink(500); }); 23
INTEL EDISON WIFI BLUETOOTH LINUX BASED
EDISON DETAILS TINY LITTLE COMPUTER Dual Core Atom CPU 500 MHz MCU 100 MHz Wi-Fi & Bluetooth LE Yocto Linux 40 GPIO MANY BREAKOUT BOARD OPTIONS 25
EDISON TIPS USE MRAA var m = require('mraa'); //require mraa npm install mraa var myLed = new m.Gpio(13); //LED hooked up to digital pin 13 myLed.dir(m.DIR_OUT); //set the gpio direction to output var ledState = true; //Boolean to hold the state of Led function periodicActivity() { myLed.write(ledState ? 1:0); //write led state to pin ledState = !ledState; //invert the ledState setTimeout(periodicActivity,1000); //call after 1 second } periodicActivity(); //call the periodicActivity function 26
EDISON SENSORS USE GROVE KIT 27
EDISON COMPATIBILITY USE UPM (USEFUL PACKAGES & MODULES) // Load PN532 module var pn532 = require('jsupm_pn532'); // Instantiate an PN532 on I2C bus 0 (default) using gpio 3 for the // IRQ, and gpio 2 for the reset pin. var myNFCObj = new pn532.PN532(3, 2); if(myNFCObj.readPassiveTargetID(pn532.PN532.BAUD_MIFARE_ISO14443A , uid, uidSize, 2000)) { // found a card – do something } https://github.com/intel-iot-devkit/upm https://github.com/intel-iot-devkit/upm/tree/master/examples/javascript 28
WHERE DO WE GO FROM HERE SMALLER & MORE POWERFUL DEVICES JS IN SMALLER FOOTPRINT BETTER HW SUPPORT WIDER CONNECTIVITY 29
THE FUTURE WORLD “Anything with a battery will have network connection.” -Ben Wen 30
THANK YOU CHARLIE KEY charlie@losant.com @zwigby LOSANT @LosantHQ 31