Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
IOT FIRE STARTER
A series of hands-on labs for the Internet of Things
WI-Fi SSID: ThingLabs
Password: ThingLabs
AGENDA
• Getting Started (Preparing your dev environment)
• Overview
• Maker 101
• Writing Digital Output
• Reading Analog...
OVERVIEW
FieldGateways
ProtocolAdapters
OSSProject
CloudGateway
EventHub->IoTHub
Hot Path Analytics
Azure Stream Analytics, Azure S...
FieldGateways
ProtocolAdapters
OSSProject
CloudGateway
EventHub->IoTHub
Hot Path Analytics
Azure Stream Analytics, Azure S...
LITTLE BRAIN <===============> BIG BRAIN
MCU + MPUMCU (e.g. ATMega) MPU
Micro-controller (MCU) MCU + MPU MPU
Example
Ardui...
WIRING A BREADBOARD
• Side rails create a circuit up and
down
• Rows create a circuit (A-E & F-J)
GETTING STARTED
Preparing your development environment
DOWNLOADS & INSTALLATIONS
• Install a Code Editor - http://Code.VisualStudio.com
• Install Git - http://git-scm.com
• Inst...
NPM INSTALLATIONS
• Install Johnny-Five
npm install -g johnny-five
• Install Particle-CLI
npm install -g particle-cli
• In...
OTHER PREPARATION
• Set Up a Development Directory
C:DevelopmentIoTLabs
• Create a Free Particle Cloud Account
https://bui...
MAKER 101
The fundamentals of maker development kits
LAB 01: WRITING DIGITAL OUTPUT
The ‘Hello, World!’ of devices
BILL OF MATERIALS
• Particle Photon
• USB to micro-USB cable (there is one included in the Photon
Development Kit)
• LED (...
CLAIM YOUR PHOTON
• Apple iPhone or Google Android – Use Particle Tinker App
• Windows PC –
• Download and install Photon ...
UPLOAD THE VOODOOSPARK FIRMWARE
• https://build.particle.io
• Create a new app named VooDooSpark
• Copy the code from http...
OHM'S LAW
• Voltage = current (in amps) x resistance
• V = IR or R = V/I or I = V/R
• Resistance (R) = Voltage (V) / Curre...
WIRINGTHEPHOTON
PACKAGE.JSON
{
"name": "IoT-Labs-Photon",
"repository": {
"type": "git",
"url": "https://github.com/ThingLabsIo/IoTLabs/Ph...
GET YOUR PHOTON TOKEN
• From a Node.js Command Prompt:
particle token list
LAB01.JS
// Define the Jonny Five and Spark-IO variables
var five = require("johnny-five");
var Particle = require(”partic...
LAB 02: READING ANALOG INPUT
Ambient Light Detection
VOLTAGE DIVIDER
A voltage divider splits input
voltage input amongst two or
more components.
The resisted voltage indicate...
WIRINGTHEPHOTON
LAB 03: INPUT CONTROLS OUTPUT
Night Light
PULSE WIDTH MODULATION (PWM)
WIRINGTHEPHOTON
CONNECTED THINGS 101
The fundamentals of connecting Things to the Cloud
LAB 04: SENDING DATA TO THE CLOUD
Nitrogen
FieldGateways
ProtocolAdapters
CloudGateway
Hot Path Analytics
Cold / Batch Analytics & Visualizations
Hot Path Business L...
NITROGEN.IO
• Nitrogen is an open-source, JavaScript cloud gateway for IoT.
• Nitrogen provides
• Device Management
• Secu...
NITROGEN: A PUB-SUB MESSAGING MODEL
Bad User
Motorized
Blinds
Rogue
Light
Light
Sensor
Nitrogen
Service
Lighting
App
Light...
WIRINGTHEPHOTON
LAB 05: COMMAND & CONTROL
CommandManager
OVERRIDING COMMANDMANAGER
• isRelevant – should I care about the message?
• Message type is _lightState or _lightLevel and...
WIRINGTHEPHOTON
LAB 06: CONNECTING MULTIPLE THINGS
Permissions
PERMISSIONS
• Permissions enable control over which Principals can interact (or not) with other
Principals
• Permission Ty...
WIRINGTHEPHOTONS
AMBIENTLIGHTDETECTOR
INDICATORLIGHT
OTHER STUFF
LITTLE BRAIN <===============> BIG BRAIN
MCU + MPUMCU (e.g. ATMega) MPU
Micro-controller (MCU) MCU + MPU MPU
Example
Ardui...
ANATOMY OF AN ARDUINO YÚN
Atheros AR9331ATmega32u4
ANATOMY OF AN ARDUINO YÚN (CONT’D)
AR9331 LinuxWi-Fi
Ethernet
Micro USB
USB Host
ATmega 32u4
MicroSD
ANATOMY OF AN ARDUINO YÚN (CONT’D)
Digital IO 1-13
Analog Output 0-53.3V, 5V, GND
GND
THINGLABS.IO
DSEVEN@MICROSOFT.COM
IVAN.JUDSON@MICROSOFT.COM
Prochain SlideShare
Chargement dans…5
×

IoT Fire Starter

762 vues

Publié le

Are you a developer who wants to learn about the Internet of Things (IoT)? Do you want to retrieve data from Internet-connected sensors for applications in home automation, healthcare, automotive, government and more? Do you want to control sensors and devices remotely from cloud, mobile, or desktop applications? In the IoT Fire Starter workshop you will use an IoT prototyping kit (that is yours to keep) to learn how to create micro-controller devices (the ‘Things’ in IoT) that use a variety of physical sensors such as light and temperature sensors; control switches; servos; and motors. You will learn how to connect these Things to Microsoft Azure IoT services to both collect data and issue control commands to the devices. Once you have mastered prototyping the hardware and connecting it to the Cloud, you will learn how to leverage Azure IoT services to gain insight into the data coming from your connected Thing, including analytics and machine learning. Following the workshop you will be able to continue your experience with your prototyping kit by following additional hands-on labs you can subscribe to online. You will need to bring your own laptop for this workshop.

Publié dans : Technologie
  • Login to see the comments

  • Soyez le premier à aimer ceci

IoT Fire Starter

  1. 1. IOT FIRE STARTER A series of hands-on labs for the Internet of Things WI-Fi SSID: ThingLabs Password: ThingLabs
  2. 2. AGENDA • Getting Started (Preparing your dev environment) • Overview • Maker 101 • Writing Digital Output • Reading Analog Input • Input Controls Output • Connected Things 101 • Sending Data to the Cloud • Command & Control • Connecting Multiple Things • Cloud IoT Services • Visualizing IoT Data • Hackathon
  3. 3. OVERVIEW
  4. 4. FieldGateways ProtocolAdapters OSSProject CloudGateway EventHub->IoTHub Hot Path Analytics Azure Stream Analytics, Azure Storm Cold / Batch Analytics & Visualizations Azure HDInsight, AzureML, Power BI, Azure Data Factory Hot Path Business Logic PaaS V2 & Actor Framework EnterpriseProcessConnections BizTalkServices,NotificationHubs Devices Linux,Android,iOS,RTOS,Windows Device Connectivity Analytics & Operationalized Insights Business Connectivity IOT DEVICE <-> CLOUD PATTERNS
  5. 5. FieldGateways ProtocolAdapters OSSProject CloudGateway EventHub->IoTHub Hot Path Analytics Azure Stream Analytics, Azure Storm Cold / Batch Analytics & Visualizations Azure HDInsight, AzureML, Power BI, Azure Data Factory Hot Path Business Logic PaaS V2 & Actor Framework EnterpriseProcessConnections BizTalkServices,NotificationHubs Devices Linux,Android,iOS,RTOS,Windows Device Connectivity Analytics & Operationalized Insights Business Connectivity IOT DEVICE <-> CLOUD PATTERNS
  6. 6. LITTLE BRAIN <===============> BIG BRAIN MCU + MPUMCU (e.g. ATMega) MPU Micro-controller (MCU) MCU + MPU MPU Example Arduino Pro Mini Arduino Uno Arduino Yún Particle Photon Raspberry Pi 2 MinnowBorad MAX Micro-controller ATmega328 ATmega328 ATmega32u4 -- -- -- Micro-processor -- -- Atheros AR9331 ARM Cortex-M3 ARM Cortex-A7 Intel Atom E38xx GPU No No No No Yes Integrated Wi-Fi SoC No No Yes Yes No No Linux No No Yes No Yes Yes Windows 10 IoT No No No No Yes Yes Cost $10 $30 $80 $19 $35++ $100 (1GB) -$140 (2GB)
  7. 7. WIRING A BREADBOARD • Side rails create a circuit up and down • Rows create a circuit (A-E & F-J)
  8. 8. GETTING STARTED Preparing your development environment
  9. 9. DOWNLOADS & INSTALLATIONS • Install a Code Editor - http://Code.VisualStudio.com • Install Git - http://git-scm.com • Install Node.js - http://nodejs.org
  10. 10. NPM INSTALLATIONS • Install Johnny-Five npm install -g johnny-five • Install Particle-CLI npm install -g particle-cli • Install Nitrogen CLI npm install -g nitrogen-cli
  11. 11. OTHER PREPARATION • Set Up a Development Directory C:DevelopmentIoTLabs • Create a Free Particle Cloud Account https://build.particle.io/signup • Create a Microsoft Azure Trial Account https://azure.microsoft.com/en-us/pricing/free-trial/
  12. 12. MAKER 101 The fundamentals of maker development kits
  13. 13. LAB 01: WRITING DIGITAL OUTPUT The ‘Hello, World!’ of devices
  14. 14. BILL OF MATERIALS • Particle Photon • USB to micro-USB cable (there is one included in the Photon Development Kit) • LED (there is one included in the Photon Development Kit) • 220-Ohm 1/4 Watt resistor (there is one included in the Photon Development Kit)
  15. 15. CLAIM YOUR PHOTON • Apple iPhone or Google Android – Use Particle Tinker App • Windows PC – • Download and install Photon drivers – https://s3.amazonaws.com/spark-website/Spark.zip • From Node.js Command Prompt: particle identify (copy the device ID) particle serial wifi (scan and select the Wi-Fi network) (Wait for Photon to restart) particle device add YOUR_DEVICE_ID_HERE
  16. 16. UPLOAD THE VOODOOSPARK FIRMWARE • https://build.particle.io • Create a new app named VooDooSpark • Copy the code from http://tinyurl.com/VooDooSpark • Target your Photon • Validate the code • Flash the Photon
  17. 17. OHM'S LAW • Voltage = current (in amps) x resistance • V = IR or R = V/I or I = V/R • Resistance (R) = Voltage (V) / Current (I) • R = 5V / 15mA (1,000 milliamps = 1 amp) • R = 5 / .015 • R = 333.333 Ohms (330 Ohms is close enough) • R = 5V / 10mA • R = 5/.01 • R = 500 Ohms (560 Ohms is close enough)
  18. 18. WIRINGTHEPHOTON
  19. 19. PACKAGE.JSON { "name": "IoT-Labs-Photon", "repository": { "type": "git", "url": "https://github.com/ThingLabsIo/IoTLabs/Photon" }, "version": "0.1.0", "private": true, "dependencies": { "johnny-five": "^0.8.0", ”particle-io": "^0.8.1” } } cd C:DevelopmentIoTLabs npm install
  20. 20. GET YOUR PHOTON TOKEN • From a Node.js Command Prompt: particle token list
  21. 21. LAB01.JS // Define the Jonny Five and Spark-IO variables var five = require("johnny-five"); var Particle = require(”particle-io"); // Define the Johnny Five board as your Particle Photon var board = new five.Board({ io: new Particle({ token: process.env.PARTICLE_KEY || 'YOUR API KEY HERE', deviceId: process.env.PARTICLE_DEVICE || 'YOUR DEVICE ID HERE' }) }); // Define the pin that is connected to the LED var LEDPIN = "D7";
  22. 22. LAB 02: READING ANALOG INPUT Ambient Light Detection
  23. 23. VOLTAGE DIVIDER A voltage divider splits input voltage input amongst two or more components. The resisted voltage indicates the value. Brighter light == Less resistance;
  24. 24. WIRINGTHEPHOTON
  25. 25. LAB 03: INPUT CONTROLS OUTPUT Night Light
  26. 26. PULSE WIDTH MODULATION (PWM)
  27. 27. WIRINGTHEPHOTON
  28. 28. CONNECTED THINGS 101 The fundamentals of connecting Things to the Cloud
  29. 29. LAB 04: SENDING DATA TO THE CLOUD Nitrogen
  30. 30. FieldGateways ProtocolAdapters CloudGateway Hot Path Analytics Cold / Batch Analytics & Visualizations Hot Path Business Logic EnterpriseProcessConnections Devices Linux,Android,iOS,RTOS,Windows Device Connectivity Analytics & Operationalized Insights Business Connectivity IOT DEVICE <-> CLOUD PATTERNS
  31. 31. NITROGEN.IO • Nitrogen is an open-source, JavaScript cloud gateway for IoT. • Nitrogen provides • Device Management • Security and permissions • Data Ingest • Command & Control • Nitrogen includes a JavaScript client library for device and web applications
  32. 32. NITROGEN: A PUB-SUB MESSAGING MODEL Bad User Motorized Blinds Rogue Light Light Sensor Nitrogen Service Lighting App Light LightSwitch Mobile App
  33. 33. WIRINGTHEPHOTON
  34. 34. LAB 05: COMMAND & CONTROL CommandManager
  35. 35. OVERRIDING COMMANDMANAGER • isRelevant – should I care about the message? • Message type is _lightState or _lightLevel and the message is either from or to this device ID • isCommand – do I need to execute the message? • Message type is _lightLevel • obsoletes – do I care any more? (e.g. have I already processes this) • Does the CommadManager think this is obsolete? • Is the downstream message _lightState, and is it in response to the specified upstream message, and is the upstream message type _lightLevel • executeQueue – do whatever needs to be done based on the message • Iterate the activeCommands and perform some action • start – get things going • Starts the CommandManager, gets all the messages and subscribes to future messages
  36. 36. WIRINGTHEPHOTON
  37. 37. LAB 06: CONNECTING MULTIPLE THINGS Permissions
  38. 38. PERMISSIONS • Permissions enable control over which Principals can interact (or not) with other Principals • Permission Types • admin • view • send • subscribe • Permissions enable explicit authorization control • n2 permission add --action subscribe --authorized true --issueTo <PRINCIPAL ID> --principalFor <PRINCIPAL ID>
  39. 39. WIRINGTHEPHOTONS AMBIENTLIGHTDETECTOR INDICATORLIGHT
  40. 40. OTHER STUFF
  41. 41. LITTLE BRAIN <===============> BIG BRAIN MCU + MPUMCU (e.g. ATMega) MPU Micro-controller (MCU) MCU + MPU MPU Example Arduino Pro Mini Arduino Uno Arduino Yún Particle Photon Raspberry Pi 2 MinnowBorad MAX Micro-controller ATmega328 ATmega328 ATmega32u4 -- -- -- Micro-processor -- -- Atheros AR9331 ARM Cortex-M3 ARM Cortex-A7 Intel Atom E38xx GPU No No No No Yes Integrated Wi-Fi SoC No No Yes Yes No No Linux No No Yes No Yes Yes Windows 10 IoT No No No No Yes Yes Cost $10 $30 $80 $19 $35++ $100 (1GB) -$140 (2GB)
  42. 42. ANATOMY OF AN ARDUINO YÚN Atheros AR9331ATmega32u4
  43. 43. ANATOMY OF AN ARDUINO YÚN (CONT’D) AR9331 LinuxWi-Fi Ethernet Micro USB USB Host ATmega 32u4 MicroSD
  44. 44. ANATOMY OF AN ARDUINO YÚN (CONT’D) Digital IO 1-13 Analog Output 0-53.3V, 5V, GND GND
  45. 45. THINGLABS.IO DSEVEN@MICROSOFT.COM IVAN.JUDSON@MICROSOFT.COM

×