Top Banner
Telemetry with Windows 10 IoT : from Raspberry Pi2 to Event Hubs Paolo Patierno Microsoft MVP Windows Embedded / IoT [email protected] @ppatierno
25

Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Aug 02, 2015

Download

Technology

Paolo Patierno
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Telemetry with Windows 10 IoT :from Raspberry Pi2 to Event

Hubs

Paolo PatiernoMicrosoft MVP Windows Embedded / IoT

[email protected]@ppatierno

Page 2: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Who am I ? Contacts• Senior Software Engineer (Leonardo Ricerche S.r.l.)

• Microsoft MVP Windows Embedded / IoT”... constantly moving between the devices and the cloud ...”

• Microsoft Azure Advisor• «DotNetCampania» member

– https://paolopatierno.wordpress.com

• «Embedded101» board of director member– http://www.embedded101.com/Blogs/PaoloPatierno.aspx

• «TinyCLR.it» member– http://www.tinyclr.it

• Linkedinhttp://it.linkedin.com/in/paolopatierno

• AllSeen Alliance «sponsored» member for AllJoin project• Eclipse «committer» for Paho project / M2Mqtt library owner

Page 3: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Agenda• Windows 10 IoT• Raspberry Pi 2 : what is it ?• Developing, tools ... and app model• Interfacing peripheral : GPIO, I2C &

SPI• Pi2 & Windows 10 IoT Core

management• Event Hubs : telemetry in the cloud• Demo time !!

Page 4: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Embedded platforms to IoT

* Windows Embedded Compact will not evolve into Windows 10; porting tools available

The Windows Embedded metro line

Page 5: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Windows 10 IoT EditionsWindows 10 IoT for industry devicesDesktop Shell, Win32 apps, Universal apps and drivers

Minimum: 1 GB RAM, 16 GB storage

X86/x64

Windows 10 IoT for mobile devicesModern Shell, Mobile apps, Universal apps and drivers

Minimum: 512 MB RAM, 4 GB storage

ARM

Windows 10 IoT CoreUniversal Apps and Drivers

No shell or MS apps

Minimum: 256MB RAM, 2GB storage

X86/x64 or ARM

Page 6: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

One Secure Connected

Pay attention !! No real time !!

Page 7: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Windows 10 IoT Core boards• Windows 10 IoT Core preview

available for Minnowboard Max and Raspberry Pi 2

Page 8: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Raspberry Pi 2 : what is it ?• Quad-core ARM Cortex A7 900 Mhz• 1 GB RAM• 4 USB ports• Full HDMI port• Ethernet port• MicroSD card slot• Camera interface (CSI)• Display interface (DSI)

Page 9: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Raspberry Pi 2 : what is it ?• 40 pins• Available– GPIO– I2C– SPI– UART **

• Not available– ADC– PWM

** not supported by Windows 10 IoT Core

Page 10: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Developing & Tools• Latest Windows 10

build• Visual Studio 2015

RC– Universal Windows

App Development Tools

Page 11: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Developing & Tools• Windows IoT Extension SDK–Windows.Devices.Gpio–Windows.Devices.I2c–Windows.Device.Spi

• Deploy– ARM architecture

Page 12: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Windows 10 IoT Core app model• Only one app with UI (headed) in

foreground (as Windows Phone)– Developed as UWP app with its own

process

• More apps without UI (headless) as BackgroundTask– Developed as UWP app and hosted in

BACKGROUNDTASKHOST.EXE process (one for each task)

– No triggers, specific “startup” task type

Page 13: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

GPIO : General Purpose Input/Output

• Digital pin (high/low value)• Input or Output direction• Read or Write operation• ValueChanged event (as an

“interrupt”)• Useful for LEDs, switches, relays,

very simple sensors

Page 14: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

I2C : Inter-Integrated Circuit• Synchronous (clock) communication

bus for connecting an MCU/CPU to devices (as sensors)

• Low speed (100 Khz to 400 Khz)• Only two wires (clock and data)• Slave addressed• Half-duplex

Page 15: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

SPI : Serial Peripheral Interface• Synchronous (clock) communication

bus for connecting an MCU/CPU to devices (as sensors)

• High speed (up to 10 Mhz and more)• Four wires (clock, data in, data out,

chip select)• Slave enabled• Full-duplex

Page 16: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Management• PowerShell & Web interface

Page 17: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Features missing from current preview

• No IIS• No WCF hosting• No RDP, use PowerShell• No graphic hardware acceleration

support• Few USB devices supported (no WiFi

or BLE dongle)

Page 18: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Telemetry• Information flowing

from a device to other systems for conveying status of device and environment

• Unidirectional• Data frequency can

be different based on applications/conditions

Page 19: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Event Hubs & Stream Analytics• Event Hubs– Ingestion system (million events/sec)– Telemetry from devices, apps,

websites– Partition consumer pattern– SAS based security, per publisher

token

• Stream Analytics– Real time analytics for IoT– Stream with million events/sec– SQL-Like language for developing– Low latency

Event Hub

Stream Analytics

Page 20: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Azure Event Hubs

Page 21: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Windows 10 IoT Core to Event Hubs

• Official Microsoft Azure Service Bus Nuget package (https://www.nuget.org/packages/WindowsAzure.ServiceBus/) – It’s only for the .Net Framework full– It doesn’t work with UWP apps (and 8.1

apps)– Full features

Page 22: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Windows 10 IoT Core to Event Hubs

• Azure SB Lite (http://azuresblite.codeplex.com/) – wrapper around AMQP .Net Lite– exposes (part of) official package APIs– porting your code is very easily– support for all .Net platforms (full,

compact and micro) and WinRT. Of course UWP apps.

Page 23: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Pi2 to Event Hubs

Page 24: Telemetry with Windows 10 IoT Core : from Raspberry Pi2 to Event Hubs

Resources• Windows Dev Center (IoT) : https://

dev.windows.com/en-US/iot • IoT Core Get Started : http://

ms-iot.github.io/content/en-US/GetStarted.htm

• Universal Windows Samples : https://github.com/Microsoft/Windows-universal-samples