SlideShare a Scribd company logo
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
FieldGateways
ProtocolAdapters
OSSProject
CloudGateway
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
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
Preparing your development environment
Photon.ThingLabs.io/00/
(v 4.0 is not compatible with this lab)
If you have a 64-bit OS, be sure to install the
64-bit version of Node.js
The fundamentals of maker development kits
Azure IoT
Azure IoT
SETUP
Push & Hold to set to
Listen mode
D7
Digital pin with
onbaod LED
RESET
Push to reboot
Azure IoTParticle Cloud
The ‘Hello, World!’ of devices
Photon.ThingLabs.io/01/
Tweet with @ThingLabsIO and #HelloIoT
"name" "IoT-Labs"
"version" "0.1.0"
"private"
"description" ”Building Things with Node.js and Johnny-Five"
"main" ”lab01.js"
"author" "YOUR NAME HERE"
"license" "MIT"
"dependencies"
"johnny-five" "^0.8.104”
"particle-io" "^0.10.1”
// lab01.js
var "johnny-five"
var "particle-io"
// Set up the access credentials for Particle and Azure
var 'YOUR PARTICLE ACCESS TOKEN HERE'
var 'YOUR PARTICLE PHOTON DEVICE ID/ALIAS HERE'
// Define the pin that is connected to the LED
var
// Create a Johnny Five board instance to represent your Particle Photon.
// ‘Board ‘is simply an abstraction of the physical hardware,
// whether it is a Photon, Arduino, Raspberry Pi or other boards.
var new
new
// The board.on() executes the anonymous function when the
// board reports back that it is initialized and ready.
"ready" function
"Board connected..."
// Set the pin you connected to the LED to OUTPUT mode
this
// Create a loop to "flash/blink/strobe" the LED once per second
var
this function
this
In this lab you will read input from an analog sensor using a voltage divider.
Photon.ThingLabs.io/02/
Tweet with @ThingLabsIO and #ilikedark
A voltage divider splits input
voltage input amongst two or
more components.
The resisted voltage indicates the
value.
Brighter light == Less resistance;
// lab02.js
var "johnny-five"
var "particle-io"
// Set up the access credentials for Particle and Azure
var 'YOUR PARTICLE ACCESS TOKEN HERE'
var 'YOUR PARTICLE PHOTON DEVICE ID/ALIAS HERE'
// Define the pin you will use to read the residual voltage
// coming from the photoresistor
var
// Create a Johnny Five board instance to represent your Particle Photon.
// ‘Board ‘is simply an abstraction of the physical hardware, whether
// it is a Photon, Arduino, Raspberry Pi or other boards.
var new
new
// The board.on() executes the anonymous function when the
// board reports back that it is initialized and ready.
"ready" function
"Board connected..."
// Read the residual voltage coming from the photoresistor
this function
// Multiple the value by 3.3V / 1024, which the the
// value range of the photoresistor
In this lab you will use analog input to control digital output.
Photon.ThingLabs.io/03/
Tweet with @ThingLabsIO and #NightLight
// lab03.js
var "johnny-five"
var "particle-io"
// Set up the access credentials for Particle and Azure
var 'YOUR PARTICLE ACCESS TOKEN HERE'
var 'YOUR PARTICLE PHOTON DEVICE ID/ALIAS HERE'
// Define the pin that is connected to the LED
var “D0"
// Define the pin you will use to read the residual voltage
// coming from the photoresistor
var "A0"
// Create a Johnny Five board instance to represent your Particle Photon. ‘Board ‘is
simply an abstraction of
// the physical hardware, whether it is a Photon, Arduino, Raspberry Pi or other boards.
var new
new
// The board.on() executes the anonymous function when the
// board reports back that it is initialized and ready.
"ready" function
"Board connected..."
// Set the pin you connected to the LED to OUTPUT mode
this
// Create a new 'photoresistor' hardware instance.
new
// Analog pin 0
// TODO: Handle the photoresistor data events
// Replace ‘TODO: Handle the photoresistor data events’ with the following:
// Define the callback function for the photoresistor reading.
// The freq value used when the photoresistor was defined
// determines how often this is invoked.
// Scale the sensor's data from 0-1023 to 0-255.
"data" function
// Multiple the value by 3.3V / 1024, which the the
// value range of the photoresistor
this
// Set the brigthness of the LED
this
The fundamentals of connecting Things to the Cloud
In this lab you will gather telemetry and send it to the cloud.
Azure.ThingLabs.io/02/
Tweet with @ThingLabsIO and #Telemetry
{
"name": "IoT-Labs",
"version": "0.1.0",
"private": true,
"description": "Sample app that connects a device to Azure using Node.js",
"main": "weather.js",
"author": "YOUR NAME HERE",
"license": "MIT",
"dependencies": {
"johnny-five": "^0.8.104",
"particle-io": "^0.10.1” ,
"j5-sparkfun-weather-shield": "^0.2.0",
"azure-iot-device": "^1.0.0-preview.3”
}
}
// weather.js
var five = require ("johnny-five");
var device = require("azure-iot-device");
var Weather = require("j5-sparkfun-weather-shield")(five);
var Particle = require("particle-io");
// Set up the access credentials for Particle and Azure
var token = 'YOUR PARTICLE ACCESS TOKEN HERE';
var deviceId = 'YOUR PARTICLE PHOTON DEVICE ID/ALIAS HERE';
var location = 'THE LOCATION OF THE PARTICLE PHOTON DEVICE';
var connectionString = 'YOUR IOT HUB DEVICE-SPECIFIC CONNECTION STRING HERE';
// Create a Johnny Five board instance to represent your Particle Photon.
// Board is simply an abstraction of the physical hardware, whether it is
// a Photon, Arduino, Raspberry Pi or other boards.
var board = new five.Board({
io: new Particle({
token: token,
deviceId: deviceId
})
});
// Create an Azure IoT client that will manage the connection to your IoT Hub
// The client is created in the context of an Azure IoT device, which is why
// you use a device-specific connection string.
var client = new device.Client(connectionString, new device.Https());
// The board.on() executes the anonymous function when the
// board reports back that it is initialized and ready.
board.on("ready", function() {
console.log("Board connected...");
// The SparkFun Weather Shield for the Particle Photon has two sensors on the I2C bus –
// a humidity sensor (HTU21D) which can provide both humidity and temperature, and a
// barometer (MPL3115A2) which can provide both barometric pressure and humidity.
// Controllers for these are wrapped in the convenient ‘Weather’ plug-in class:
var weather = new Weather({
variant: "PHOTON",
freq: 1000,
elevation: 100 // Put your current elevation (in feet) here
})
// Don’t close the board.on() function yet
// The weather.on("data", callback) function invokes the anonymous callback function
// whenever the data from the sensor changes (no faster than every 25ms). The anonymous
// function is scoped to the object (e.g. this == the instance of Weather class object).
weather.on(“data" , function () {
// Create an Azure IoT Message
var payload = JSON.stringify({
deviceId: deviceId,
location: location,
// celsius & fahrenheit are averages taken from both sensors on the shield
celsius: this.celsius,
fahrenheit: this.fahrenheit,
relativeHumidity: this.relativeHumidity,
pressure: this.pressure,
feet: this.feet,
meters: this.meters
});
// Don’t close the weather.on() or board.on() functions yet
// Create the message based on the payload JSON
var message = new device.Message(payload);
// For debugging purposes, write out the message payload to the console
console.log("Sending message: " + message.getData());
// Send the message to Azure IoT Hub
// printResultsFor() is a function you will write next
client.sendEvent(message, printResultFor('send'));
}); // Close the weather.on() function
}); // Close the board.on() function
In this lab you will create visualizations of IoT data.
Azure.ThingLabs.io/03/
Tweet with @ThingLabsIO and #IoTBI
SELECT
MAX(fahrenheit) MaxTempF,
MIN(fahrenheit) MinTempF,
AVG(fahrenheit) AvgTempF,
MAX(celsius) MaxTempC,
MIN(celsius) MinTempC,
AVG(celsius) AvgTempC,
MAX(relativeHumidity) MaxHumidity,
MIN(relativeHumidity) MinHumidity,
AVG(relativeHumidity) AvgHumidity,
location,
deviceId,
System.Timestamp AS Timestamp
INTO
[TemperatureBI]
FROM
[DeviceInputStream]
GROUP BY
TumblingWindow (second, 1), deviceId, location
Tweet with @ThingLabsIO and #ThatWasAwesome

More Related Content

What's hot

Sun Spot Talk
Sun Spot TalkSun Spot Talk
Sun Spot Talk
vittalp88
 
A Self-Adaptive Deployment Framework for Service-Oriented Systems
A Self-Adaptive Deployment Framework for Service-Oriented SystemsA Self-Adaptive Deployment Framework for Service-Oriented Systems
A Self-Adaptive Deployment Framework for Service-Oriented Systems
Sander van der Burg
 
Event driven-automation and workflows
Event driven-automation and workflowsEvent driven-automation and workflows
Event driven-automation and workflows
Dmitri Zimine
 
Birdwatching using a Raspberry pi, Azure IoT Hub and Cognitive services
Birdwatching using a Raspberry pi, Azure IoT Hub and Cognitive servicesBirdwatching using a Raspberry pi, Azure IoT Hub and Cognitive services
Birdwatching using a Raspberry pi, Azure IoT Hub and Cognitive services
John Staveley
 
Mistral and StackStorm
Mistral and StackStormMistral and StackStorm
Mistral and StackStorm
Dmitri Zimine
 
Join FIWARE Lab
Join FIWARE LabJoin FIWARE Lab
Join FIWARE Lab
Federico Michele Facca
 
Virus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing GatekeeperVirus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing Gatekeeper
Synack
 
Gatekeeper Exposed
Gatekeeper ExposedGatekeeper Exposed
Gatekeeper Exposed
Synack
 
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
KatyShimizu
 
Automated Abstraction of Flow of Control in a System of Distributed Software...
Automated Abstraction of Flow of Control in a System of Distributed  Software...Automated Abstraction of Flow of Control in a System of Distributed  Software...
Automated Abstraction of Flow of Control in a System of Distributed Software...nimak
 
Security Automation Simplified - BSides Austin 2019
Security Automation Simplified - BSides Austin 2019Security Automation Simplified - BSides Austin 2019
Security Automation Simplified - BSides Austin 2019
Moses Schwartz
 
Raspberry pi and Azure
Raspberry pi and AzureRaspberry pi and Azure
Raspberry pi and Azure
Faisal Mehmood
 
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT Meetup
 

What's hot (13)

Sun Spot Talk
Sun Spot TalkSun Spot Talk
Sun Spot Talk
 
A Self-Adaptive Deployment Framework for Service-Oriented Systems
A Self-Adaptive Deployment Framework for Service-Oriented SystemsA Self-Adaptive Deployment Framework for Service-Oriented Systems
A Self-Adaptive Deployment Framework for Service-Oriented Systems
 
Event driven-automation and workflows
Event driven-automation and workflowsEvent driven-automation and workflows
Event driven-automation and workflows
 
Birdwatching using a Raspberry pi, Azure IoT Hub and Cognitive services
Birdwatching using a Raspberry pi, Azure IoT Hub and Cognitive servicesBirdwatching using a Raspberry pi, Azure IoT Hub and Cognitive services
Birdwatching using a Raspberry pi, Azure IoT Hub and Cognitive services
 
Mistral and StackStorm
Mistral and StackStormMistral and StackStorm
Mistral and StackStorm
 
Join FIWARE Lab
Join FIWARE LabJoin FIWARE Lab
Join FIWARE Lab
 
Virus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing GatekeeperVirus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing Gatekeeper
 
Gatekeeper Exposed
Gatekeeper ExposedGatekeeper Exposed
Gatekeeper Exposed
 
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
 
Automated Abstraction of Flow of Control in a System of Distributed Software...
Automated Abstraction of Flow of Control in a System of Distributed  Software...Automated Abstraction of Flow of Control in a System of Distributed  Software...
Automated Abstraction of Flow of Control in a System of Distributed Software...
 
Security Automation Simplified - BSides Austin 2019
Security Automation Simplified - BSides Austin 2019Security Automation Simplified - BSides Austin 2019
Security Automation Simplified - BSides Austin 2019
 
Raspberry pi and Azure
Raspberry pi and AzureRaspberry pi and Azure
Raspberry pi and Azure
 
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
 

Similar to ThingLabs IoT Workshop

Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)
Amarjeetsingh Thakur
 
IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2
John Staveley
 
Report for weather pi
Report for weather piReport for weather pi
Report for weather pi
Asutosh Hota
 
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
Amazon Web Services
 
SRV408 Deep Dive on AWS IoT
SRV408 Deep Dive on AWS IoTSRV408 Deep Dive on AWS IoT
SRV408 Deep Dive on AWS IoT
Amazon Web Services
 
Webshield internet of things
Webshield internet of thingsWebshield internet of things
Webshield internet of things
Raghav Shetty
 
Introducing the Sun SPOTs
Introducing the Sun SPOTsIntroducing the Sun SPOTs
Introducing the Sun SPOTs
Stefano Sanna
 
Scripting Things - Creating the Internet of Things with Perl
Scripting Things - Creating the Internet of Things with PerlScripting Things - Creating the Internet of Things with Perl
Scripting Things - Creating the Internet of Things with Perl
Hans Scharler
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection system
Aashiq Ahamed N
 
Ardunio + MySQL = direct database connections.
Ardunio + MySQL = direct database connections.  Ardunio + MySQL = direct database connections.
Ardunio + MySQL = direct database connections.
Walter W. Leutwyler
 
How To Electrocute Yourself using the Internet
How To Electrocute Yourself using the InternetHow To Electrocute Yourself using the Internet
How To Electrocute Yourself using the Internet
Alexander Roche
 
Book
BookBook
Book
luis_lmro
 
Programming the Physical World with Device Shadows and Rules Engine
Programming the Physical World with Device Shadows and Rules EngineProgramming the Physical World with Device Shadows and Rules Engine
Programming the Physical World with Device Shadows and Rules Engine
Amazon Web Services
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
Codemotion
 
Fire & Ice: Making and Breaking macOS Firewalls
Fire & Ice: Making and Breaking macOS FirewallsFire & Ice: Making and Breaking macOS Firewalls
Fire & Ice: Making and Breaking macOS Firewalls
Priyanka Aash
 
Controlling robots using javascript
Controlling robots using javascriptControlling robots using javascript
Controlling robots using javascript
Sudar Muthu
 
Fiware IoT_IDAS_intro_ul20_v2
Fiware IoT_IDAS_intro_ul20_v2Fiware IoT_IDAS_intro_ul20_v2
Fiware IoT_IDAS_intro_ul20_v2
FIWARE
 
FIWARE Training: Connecting to Legacy Systems, IoT and other Systems
FIWARE Training: Connecting to Legacy Systems, IoT and other SystemsFIWARE Training: Connecting to Legacy Systems, IoT and other Systems
FIWARE Training: Connecting to Legacy Systems, IoT and other Systems
FIWARE
 
AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)
Amazon Web Services Korea
 
Microsoft's view of the Internet of Things (IoT) by Imran Shafqat
Microsoft's view of the Internet of Things (IoT) by Imran ShafqatMicrosoft's view of the Internet of Things (IoT) by Imran Shafqat
Microsoft's view of the Internet of Things (IoT) by Imran Shafqat
Allied Consultants
 

Similar to ThingLabs IoT Workshop (20)

Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)
 
IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2
 
Report for weather pi
Report for weather piReport for weather pi
Report for weather pi
 
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
 
SRV408 Deep Dive on AWS IoT
SRV408 Deep Dive on AWS IoTSRV408 Deep Dive on AWS IoT
SRV408 Deep Dive on AWS IoT
 
Webshield internet of things
Webshield internet of thingsWebshield internet of things
Webshield internet of things
 
Introducing the Sun SPOTs
Introducing the Sun SPOTsIntroducing the Sun SPOTs
Introducing the Sun SPOTs
 
Scripting Things - Creating the Internet of Things with Perl
Scripting Things - Creating the Internet of Things with PerlScripting Things - Creating the Internet of Things with Perl
Scripting Things - Creating the Internet of Things with Perl
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection system
 
Ardunio + MySQL = direct database connections.
Ardunio + MySQL = direct database connections.  Ardunio + MySQL = direct database connections.
Ardunio + MySQL = direct database connections.
 
How To Electrocute Yourself using the Internet
How To Electrocute Yourself using the InternetHow To Electrocute Yourself using the Internet
How To Electrocute Yourself using the Internet
 
Book
BookBook
Book
 
Programming the Physical World with Device Shadows and Rules Engine
Programming the Physical World with Device Shadows and Rules EngineProgramming the Physical World with Device Shadows and Rules Engine
Programming the Physical World with Device Shadows and Rules Engine
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
Fire & Ice: Making and Breaking macOS Firewalls
Fire & Ice: Making and Breaking macOS FirewallsFire & Ice: Making and Breaking macOS Firewalls
Fire & Ice: Making and Breaking macOS Firewalls
 
Controlling robots using javascript
Controlling robots using javascriptControlling robots using javascript
Controlling robots using javascript
 
Fiware IoT_IDAS_intro_ul20_v2
Fiware IoT_IDAS_intro_ul20_v2Fiware IoT_IDAS_intro_ul20_v2
Fiware IoT_IDAS_intro_ul20_v2
 
FIWARE Training: Connecting to Legacy Systems, IoT and other Systems
FIWARE Training: Connecting to Legacy Systems, IoT and other SystemsFIWARE Training: Connecting to Legacy Systems, IoT and other Systems
FIWARE Training: Connecting to Legacy Systems, IoT and other Systems
 
AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)
 
Microsoft's view of the Internet of Things (IoT) by Imran Shafqat
Microsoft's view of the Internet of Things (IoT) by Imran ShafqatMicrosoft's view of the Internet of Things (IoT) by Imran Shafqat
Microsoft's view of the Internet of Things (IoT) by Imran Shafqat
 

Recently uploaded

By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

ThingLabs IoT Workshop

  • 1.
  • 2.
  • 3.
  • 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
  • 5. FieldGateways ProtocolAdapters OSSProject CloudGateway 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
  • 6. 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
  • 7.
  • 8. Preparing your development environment Photon.ThingLabs.io/00/
  • 9. (v 4.0 is not compatible with this lab) If you have a 64-bit OS, be sure to install the 64-bit version of Node.js
  • 10.
  • 11.
  • 12. The fundamentals of maker development kits
  • 15.
  • 16. SETUP Push & Hold to set to Listen mode D7 Digital pin with onbaod LED RESET Push to reboot
  • 18.
  • 19.
  • 20. The ‘Hello, World!’ of devices Photon.ThingLabs.io/01/ Tweet with @ThingLabsIO and #HelloIoT
  • 21.
  • 22.
  • 23. "name" "IoT-Labs" "version" "0.1.0" "private" "description" ”Building Things with Node.js and Johnny-Five" "main" ”lab01.js" "author" "YOUR NAME HERE" "license" "MIT" "dependencies" "johnny-five" "^0.8.104” "particle-io" "^0.10.1”
  • 24.
  • 25.
  • 26. // lab01.js var "johnny-five" var "particle-io" // Set up the access credentials for Particle and Azure var 'YOUR PARTICLE ACCESS TOKEN HERE' var 'YOUR PARTICLE PHOTON DEVICE ID/ALIAS HERE' // Define the pin that is connected to the LED var // Create a Johnny Five board instance to represent your Particle Photon. // ‘Board ‘is simply an abstraction of the physical hardware, // whether it is a Photon, Arduino, Raspberry Pi or other boards. var new new
  • 27. // The board.on() executes the anonymous function when the // board reports back that it is initialized and ready. "ready" function "Board connected..." // Set the pin you connected to the LED to OUTPUT mode this // Create a loop to "flash/blink/strobe" the LED once per second var this function this
  • 28. In this lab you will read input from an analog sensor using a voltage divider. Photon.ThingLabs.io/02/ Tweet with @ThingLabsIO and #ilikedark
  • 29. A voltage divider splits input voltage input amongst two or more components. The resisted voltage indicates the value. Brighter light == Less resistance;
  • 30.
  • 31. // lab02.js var "johnny-five" var "particle-io" // Set up the access credentials for Particle and Azure var 'YOUR PARTICLE ACCESS TOKEN HERE' var 'YOUR PARTICLE PHOTON DEVICE ID/ALIAS HERE' // Define the pin you will use to read the residual voltage // coming from the photoresistor var // Create a Johnny Five board instance to represent your Particle Photon. // ‘Board ‘is simply an abstraction of the physical hardware, whether // it is a Photon, Arduino, Raspberry Pi or other boards. var new new
  • 32. // The board.on() executes the anonymous function when the // board reports back that it is initialized and ready. "ready" function "Board connected..." // Read the residual voltage coming from the photoresistor this function // Multiple the value by 3.3V / 1024, which the the // value range of the photoresistor
  • 33. In this lab you will use analog input to control digital output. Photon.ThingLabs.io/03/ Tweet with @ThingLabsIO and #NightLight
  • 34.
  • 35.
  • 36. // lab03.js var "johnny-five" var "particle-io" // Set up the access credentials for Particle and Azure var 'YOUR PARTICLE ACCESS TOKEN HERE' var 'YOUR PARTICLE PHOTON DEVICE ID/ALIAS HERE' // Define the pin that is connected to the LED var “D0" // Define the pin you will use to read the residual voltage // coming from the photoresistor var "A0" // Create a Johnny Five board instance to represent your Particle Photon. ‘Board ‘is simply an abstraction of // the physical hardware, whether it is a Photon, Arduino, Raspberry Pi or other boards. var new new
  • 37. // The board.on() executes the anonymous function when the // board reports back that it is initialized and ready. "ready" function "Board connected..." // Set the pin you connected to the LED to OUTPUT mode this // Create a new 'photoresistor' hardware instance. new // Analog pin 0 // TODO: Handle the photoresistor data events
  • 38. // Replace ‘TODO: Handle the photoresistor data events’ with the following: // Define the callback function for the photoresistor reading. // The freq value used when the photoresistor was defined // determines how often this is invoked. // Scale the sensor's data from 0-1023 to 0-255. "data" function // Multiple the value by 3.3V / 1024, which the the // value range of the photoresistor this // Set the brigthness of the LED this
  • 39. The fundamentals of connecting Things to the Cloud
  • 40.
  • 41.
  • 42. In this lab you will gather telemetry and send it to the cloud. Azure.ThingLabs.io/02/ Tweet with @ThingLabsIO and #Telemetry
  • 43. { "name": "IoT-Labs", "version": "0.1.0", "private": true, "description": "Sample app that connects a device to Azure using Node.js", "main": "weather.js", "author": "YOUR NAME HERE", "license": "MIT", "dependencies": { "johnny-five": "^0.8.104", "particle-io": "^0.10.1” , "j5-sparkfun-weather-shield": "^0.2.0", "azure-iot-device": "^1.0.0-preview.3” } }
  • 44. // weather.js var five = require ("johnny-five"); var device = require("azure-iot-device"); var Weather = require("j5-sparkfun-weather-shield")(five); var Particle = require("particle-io"); // Set up the access credentials for Particle and Azure var token = 'YOUR PARTICLE ACCESS TOKEN HERE'; var deviceId = 'YOUR PARTICLE PHOTON DEVICE ID/ALIAS HERE'; var location = 'THE LOCATION OF THE PARTICLE PHOTON DEVICE'; var connectionString = 'YOUR IOT HUB DEVICE-SPECIFIC CONNECTION STRING HERE';
  • 45. // Create a Johnny Five board instance to represent your Particle Photon. // Board is simply an abstraction of the physical hardware, whether it is // a Photon, Arduino, Raspberry Pi or other boards. var board = new five.Board({ io: new Particle({ token: token, deviceId: deviceId }) }); // Create an Azure IoT client that will manage the connection to your IoT Hub // The client is created in the context of an Azure IoT device, which is why // you use a device-specific connection string. var client = new device.Client(connectionString, new device.Https());
  • 46. // The board.on() executes the anonymous function when the // board reports back that it is initialized and ready. board.on("ready", function() { console.log("Board connected..."); // The SparkFun Weather Shield for the Particle Photon has two sensors on the I2C bus – // a humidity sensor (HTU21D) which can provide both humidity and temperature, and a // barometer (MPL3115A2) which can provide both barometric pressure and humidity. // Controllers for these are wrapped in the convenient ‘Weather’ plug-in class: var weather = new Weather({ variant: "PHOTON", freq: 1000, elevation: 100 // Put your current elevation (in feet) here }) // Don’t close the board.on() function yet
  • 47. // The weather.on("data", callback) function invokes the anonymous callback function // whenever the data from the sensor changes (no faster than every 25ms). The anonymous // function is scoped to the object (e.g. this == the instance of Weather class object). weather.on(“data" , function () { // Create an Azure IoT Message var payload = JSON.stringify({ deviceId: deviceId, location: location, // celsius & fahrenheit are averages taken from both sensors on the shield celsius: this.celsius, fahrenheit: this.fahrenheit, relativeHumidity: this.relativeHumidity, pressure: this.pressure, feet: this.feet, meters: this.meters }); // Don’t close the weather.on() or board.on() functions yet
  • 48. // Create the message based on the payload JSON var message = new device.Message(payload); // For debugging purposes, write out the message payload to the console console.log("Sending message: " + message.getData()); // Send the message to Azure IoT Hub // printResultsFor() is a function you will write next client.sendEvent(message, printResultFor('send')); }); // Close the weather.on() function }); // Close the board.on() function
  • 49. In this lab you will create visualizations of IoT data. Azure.ThingLabs.io/03/ Tweet with @ThingLabsIO and #IoTBI
  • 50.
  • 51.
  • 52.
  • 53. SELECT MAX(fahrenheit) MaxTempF, MIN(fahrenheit) MinTempF, AVG(fahrenheit) AvgTempF, MAX(celsius) MaxTempC, MIN(celsius) MinTempC, AVG(celsius) AvgTempC, MAX(relativeHumidity) MaxHumidity, MIN(relativeHumidity) MinHumidity, AVG(relativeHumidity) AvgHumidity, location, deviceId, System.Timestamp AS Timestamp INTO [TemperatureBI] FROM [DeviceInputStream] GROUP BY TumblingWindow (second, 1), deviceId, location
  • 54.
  • 55.
  • 56. Tweet with @ThingLabsIO and #ThatWasAwesome