Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

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

9,333 views

Published on

Session for the Mobile Camp 2015 in Naples focused on Windows 10 IoT Core on Raspberry Pi 2 and the telemetry scenario to Microsoft Azure Event Hubs.

Published in: Technology

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

  1. 1. Telemetry with Windows 10 IoT : from Raspberry Pi2 to Event Hubs Paolo Patierno Microsoft MVP Windows Embedded / IoT ppatierno@live.com @ppatierno
  2. 2. 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 • Linkedin http://it.linkedin.com/in/paolopatierno • AllSeen Alliance «sponsored» member for AllJoin project • Eclipse «committer» for Paho project / M2Mqtt library owner
  3. 3. 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 !!
  4. 4. Embedded platforms to IoT * Windows Embedded Compact will not evolve into Windows 10; porting tools available The Windows Embedded metro line 
  5. 5. Windows 10 IoT Editions Windows 10 IoT for industry devices Desktop Shell, Win32 apps, Universal apps and drivers Minimum: 1 GB RAM, 16 GB storage X86/x64 Windows 10 IoT for mobile devices Modern Shell, Mobile apps, Universal apps and drivers Minimum: 512 MB RAM, 4 GB storage ARM Windows 10 IoT Core Universal Apps and Drivers No shell or MS apps Minimum: 256MB RAM, 2GB storage X86/x64 or ARM
  6. 6. One  Secure  Connected Pay attention !! No real time !!
  7. 7. Windows 10 IoT Core boards • Windows 10 IoT Core preview available for Minnowboard Max and Raspberry Pi 2
  8. 8. 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)
  9. 9. Raspberry Pi 2 : what is it ? • 40 pins • Available – GPIO – I2C – SPI – UART ** • Not available – ADC – PWM ** not supported by Windows 10 IoT Core
  10. 10. Developing & Tools • Latest Windows 10 build • Visual Studio 2015 RC – Universal Windows App Development Tools
  11. 11. Developing & Tools • Windows IoT Extension SDK – Windows.Devices.Gpio – Windows.Devices.I2c – Windows.Device.Spi • Deploy – ARM architecture
  12. 12. 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
  13. 13. 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
  14. 14. 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
  15. 15. 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
  16. 16. Management • PowerShell & Web interface
  17. 17. 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)
  18. 18. 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
  19. 19. 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
  20. 20. Azure Event Hubs
  21. 21. 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
  22. 22. 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.
  23. 23. Pi2 to Event Hubs
  24. 24. 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
  25. 25. Resources • Event Hubs : http://azure.microsoft.com/en- us/services/event-hubs/ • Stream Analytics : http://azure.microsoft.com/en- us/services/stream-analytics/ • Azure SB Lite : http://azuresblite.codeplex.com/ • ConnectTheDots : https://github.com/MSOpenTech/connectthe dots

×