Top Banner
Zagreb, 24.09.2015. Hotel Antunović
23

IoT with UWP, .NETCore and Azure

Feb 18, 2017

Download

Software

Damir Dobric
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: IoT with UWP, .NETCore and Azure

Zagreb,24.09.2015.Hotel Antunović

Page 3: IoT with UWP, .NETCore and Azure

Zagreb,24.09.2015.

IoT with UWP & NetCore

Damir Dobric

Page 4: IoT with UWP, .NETCore and Azure

AGENDA

IoT Apps on UWP How to “I” in IoT? IoT Apps on .NET Core

Page 5: IoT with UWP, .NETCore and Azure

.net

UWP .net core

Page 6: IoT with UWP, .NETCore and Azure

demo

ImplementDeployConnect

Run UWP App on PI2

Page 7: IoT with UWP, .NETCore and Azure

How does it work?

Page 8: IoT with UWP, .NETCore and Azure

Controlling GPIO

Page 9: IoT with UWP, .NETCore and Azure

Assemblies for Messaging

• Open Source Messaging Library for Azure Service Bus and Event Hub• Support for different platforms (UWP, NETMF, net Core, Desktop)• Protocols: HTTP/AMQP

Page 10: IoT with UWP, .NETCore and Azure

Send Message

Page 11: IoT with UWP, .NETCore and Azure

Receive Message

Page 12: IoT with UWP, .NETCore and Azure

.NET Core

https://dotnet.github.io/core/about/overview.html

Page 13: IoT with UWP, .NETCore and Azure

demo

ImplementDeployConnect

Run .net Core on PI2

Page 14: IoT with UWP, .NETCore and Azure

.NET Core Where is documentation?

https://dotnet.readthedocs.org/en/latest/

How to install?https://dotnet.readthedocs.org/en/latest/getting-started/installing-core-windows.html@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}“

This installs DNVM (.NET Version Manager) Run c:\> dnvm

Install DNX:c:\>dnvm install -r coreclr -arch x64 latest -u

Page 15: IoT with UWP, .NETCore and Azure

Write some code

Console.ForegroundColor = ConsoleColor.Yellow;Console.WriteLine("Hello World");

Console.WriteLine("Machine: {0}, OS: {1}, Processors: {2}", Environment.GetEnvironmentVariable("COMPUTERNAME"), Environment.GetEnvironmentVariable("OS"), Environment.ProcessorCount);

Console.WriteLine(DateTime.Now.ToString());

Page 16: IoT with UWP, .NETCore and Azure

Add required references

project.json  . . . "frameworks": { "dnx451": { }, "dnxcore50": { "dependencies": { "System.Collections": "4.0.10-beta-23019", "System.Console": "4.0.0-beta-23019", "System.Linq": "4.0.0-beta-23019", "System.Threading": "4.0.10-beta-23019", "Microsoft.CSharp": "4.0.0-beta-23019" } } }

Page 17: IoT with UWP, .NETCore and Azure

Build and Package

C>dnu publish --out "C:\temp\netcoreapp\publish" --no-source --runtime dnx-coreclr-win-arm.1.0.0-beta7-12364

Page 18: IoT with UWP, .NETCore and Azure

Connect to PI2

>net start winrm

>Set-Item WSMan:\localhost\Client\TrustedHosts –Value 192.168.178.79

>Enter-PSSession -ComputerName 192.168.178.79 -Credential Administrator

Page 19: IoT with UWP, .NETCore and Azure

Start Application

[192.168.178.79]: PS C:\netcore\netcoreapp> .\go.cmd

Page 20: IoT with UWP, .NETCore and Azure

References Cross-Plarform Console App

http://docs.asp.net/en/latest/dnx/console.html Running .NET Core App on PI2

http://developers.de/blogs/damir_dobric/archive/2015/09/22/how-to-run-net-core-application-on-pi2-win10-iot-core.aspx

JS SB SDKhttp://developers.de/blogs/damir_dobric/archive/2015/01/26/eventhubs-support-for-azure-servicebus-javascript-sdk.aspx

Win 10 IoT Corehttps://ms-iot.github.io/content/en-US/GetStarted.htm

Cross Platform Messaging:comming soon . Follow at http://developers.de

Page 21: IoT with UWP, .NETCore and Azure

pitanja

Blog Twitter

[email protected]@microsoft.com

https://twitter.com/ddobrichttp://developers.de/blogs/damir_dobric/default.aspx

Page 22: IoT with UWP, .NETCore and Azure

ankete

Ankete su dostupne na:a) Mobilnim uređajima (Android, Apple, Windows)b) Web-u http://www.mobilityday.com PIN za pristup se nalazi na poleđini akreditacije i u vašem on-line profilu.

Popunite ankete i osvojite vrijedne nagrade!

Page 23: IoT with UWP, .NETCore and Azure

demo