From 349cbec5b322448362d3ad9a0ceec05a9afaec74 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:40:02 -0700 Subject: [PATCH 01/19] Update README.md --- Samples/WeatherStation/README.md | 84 ++++++++++++++++++++++++++++---- 1 file changed, 75 insertions(+), 9 deletions(-) diff --git a/Samples/WeatherStation/README.md b/Samples/WeatherStation/README.md index 725da4502..d62a3aa23 100644 --- a/Samples/WeatherStation/README.md +++ b/Samples/WeatherStation/README.md @@ -2,24 +2,90 @@ page_type: sample urlFragment: weather-station languages: - - cpp - csharp - - vb products: - windows description: Communicate with an I2C/SPI based temperature and pressure sensor with Windows 10 IoT Core. --- -# Weather Station +# Azure Weather Station -Communicate with an I2C/SPI based temperature and pressure sensor +## Adapted from [here](https://blogs.msdn.microsoft.com/iot/2016/01/26/using-power-bi-to-visualize-sensor-data-from-windows-10-iot-core/). -Upon executing this sample, you'll have learned how to measure temperature and pressure using I2C/SPI! +## Introduction +Building a weather station is the rite of passage for beginning IoT enthusiasts. It's easy to put together from inexpensive components and provides immediate gratification. For example, you can blow air on your sensor and watch the temperature graph spike up or down. You can leave the weather station in your home and monitor humidity and temperature remotely. The list goes on. -[Each pin on this map](https://adafruitsample.azurewebsites.net/cardViewer?lesson=203) is another maker that has run this sample. Zoom around to see where they are and deploy the sample to put your pin on the map! +At the same time, the project presents some unique challenges. How do you send the data from your device to the cloud? How do you visualize it in interesting ways? Finally -- how do you make sure you're looking at your data? In other words, how do you reliably authenticate your device? -![weather-station](../../Resources/images/AdafruitStarterPack/WeatherStation.jpg) +## Authenticating a Headless Device +In a typical OAuth 2.0 authorization flow, the user is presented with a browser window where they can enter their credentials. The application then obtains an access token that is used to communicate with the desired cloud service. Alas, this approach is not suitable for headless IoT devices without the mouse and keyboard attached, or devices that only offer console I/O. -### Click [here](https://www.hackster.io/windows-iot/weather-station) to get started! +This problem is solved with the latest version of the Active Directory Authentication Library (still in preview) that introduces a new authentication flow tailored for headless devices. The approach goes like this: when a user authentication is required, instead of bringing up a browser window, the app asks the user to use another device to navigate to [https://aka.ms/devicelogin](https://aka.ms/devicelogin) and enter a specific code. Once the code is provided, the web page will lead the user through a normal authentication experience, including consent prompts and multi factor authentication if necessary. Upon successful authentication, the app will receive the required access tokens through a back channel and use it to access the desired cloud service. -### If you have v2 of the kit with a BME280 Click [here](https://www.hackster.io/windows-iot/weather-station-v-2-0-8abe16?auth_token=80b912d8d81919969ccab0080ddd8e2f) to get started! +## Hardware Setup +For this example, we will use a humidity and temperature sensor, such as the HTU21D, which is available from a number of vendors (e.g., Sparkfun, Amazon). + +The sensor connects to your device via I²C bus, as shown on the following wiring diagram (the location of the pins might be slightly different if you're using a device other than Raspberry Pi 2): + +![Humidity and temperature sensor](https://msdnshared.blob.core.windows.net/media/2016/01/humidity-htu21d_bb.png) + +## Software Setup +The software setup will require several steps. First, we'll need to register an application in the Azure Active Directory. Then, we'll copy the client ID from the application and use it in our UWP app running on the device. Finally, we'll create a dashboard in Power BI to visualize data coming from our device. + +### Registering an Application in Azure +This step assumes that your organization already has an Azure Active Directory set up. If not, you can get started here. + +You can register your application from the Azure Portal, however it's easier to do it from the dedicated Power BI application registration page [here](https://dev.powerbi.com/apps). + +Navigate to the above page, log in with your Power BI credentials and fill out the information about your app: + +![Power Bi app information](https://msdnshared.blob.core.windows.net/media/2016/01/Register_app_step2.png) + +Note that I used a dummy URL for the redirect -- our app will not need this information but we cannot leave this field empty. + +In the next step, enable the "Read All Datasets" and "Read and Write All Datasets" APIs and click "Register App". + +Once this is done, click "Register App". The web page will generate the Client ID, which looks like this: + +![Register your app](https://msdnshared.blob.core.windows.net/media/2016/01/Register_app_step4.png) + +Leave the browser page open -- we will need to copy the Client ID and paste it into our C# app. + +## Build the App +The C# app UWP that we're going to use combines the Power BI REST APIs with the use of headless device flow from the Azure Active Directory Library described [here](https://github.com/Azure-Samples/active-directory-dotnet-deviceprofile/). + +The full source of the app is available on our GitHub repository [here](https://github.com/ms-iot/samples/tree/develop/Azure/WeatherStation.PowerBI). + +To run your application on your device, you need to get the source code and find the clientID constant in PBIClient.cs: + +``` + // WeatherPBIApp: replace with the actual Client ID from the Azure Application: + private const string clientID = ""; +``` + +Replace the value with the string obtained from the registered Azure Application at the previous step and compile the app for ARM architecture. For this app, you will need to connect your Raspberry Pi to a monitor (keyboard and mouse are not required) to display the user code from the device. While this means that the device is no longer completely headless, you might imagine a slightly more advanced version of the app where the user code is communicated via an SMS message, an HTTP POST request, or is displayed on an [LED matrix](https://www.raspberrypi.org/products/sense-hat/). + +Deploy the app to your Raspberry Pi. If all goes well, you should see the following: + +![Running Raspberry Pi app](https://msdnshared.blob.core.windows.net/media/2016/01/App_running.png) + +Now switch to another device -- either a desktop PC or a phone and navigate to the specified URL. Type in the specified user code and press Continue: + +![Signing into application](https://msdnshared.blob.core.windows.net/media/2016/01/signin1.png) + +Once the user code is accepted, the application will receive the access code and start sending data to Power BI. + +### Configure Power BI Dashboard +Login to your [Power BI account](https://powerbi.microsoft.com/en-us/) and look for the "WeatherReport" dataset in the navigation bar on the left. In the Visualization pane create a "Temperature by Time" line chart: + +![Temperature by Time line chart](https://msdnshared.blob.core.windows.net/media/2016/01/TemperaturexTime.png) + +You can then create a "Humidity by Time" chart in a similar way. Alternatively, you can plot both temperature and humidity on the same axis. + +Now save your report and pin it to the dashboard. You should see something that looks like this: + +![Temperature and humidity charts](https://msdnshared.blob.core.windows.net/media/2016/01/dashboard.png) + +That's it! Enjoy your weather station! + +Want to learn more about using Power BI to visualize sensor data from IoT Core? Read the blog post [here](https://blogs.msdn.microsoft.com/iot/2016/01/26/using-power-bi-to-visualize-sensor-data-from-windows-10-iot-core/). From ffdfe4dab7e8ae8faa59837407eb3bd0f3dd2a02 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:41:13 -0700 Subject: [PATCH 02/19] Update README.md --- Samples/WeatherStation/CS/README.md | 82 ++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 7 deletions(-) diff --git a/Samples/WeatherStation/CS/README.md b/Samples/WeatherStation/CS/README.md index d05b46afc..b0c7d027c 100644 --- a/Samples/WeatherStation/CS/README.md +++ b/Samples/WeatherStation/CS/README.md @@ -1,13 +1,81 @@ -# Weather Station +# Azure Weather Station -Communicate with an I2C/SPI based temperature and pressure sensor +## Adapted from [here](https://blogs.msdn.microsoft.com/iot/2016/01/26/using-power-bi-to-visualize-sensor-data-from-windows-10-iot-core/). -Upon executing this sample, you'll have learned how to measure temperature and pressure using I2C/SPI! +## Introduction +Building a weather station is the rite of passage for beginning IoT enthusiasts. It's easy to put together from inexpensive components and provides immediate gratification. For example, you can blow air on your sensor and watch the temperature graph spike up or down. You can leave the weather station in your home and monitor humidity and temperature remotely. The list goes on. -[Each pin on this map](https://adafruitsample.azurewebsites.net/cardViewer?lesson=203) is another maker that has run this sample. Zoom around to see where they are and deploy the sample to put your pin on the map! +At the same time, the project presents some unique challenges. How do you send the data from your device to the cloud? How do you visualize it in interesting ways? Finally -- how do you make sure you're looking at your data? In other words, how do you reliably authenticate your device? -![weather-station](../../../Resources/images/AdafruitStarterPack/WeatherStation.jpg) +## Authenticating a Headless Device +In a typical OAuth 2.0 authorization flow, the user is presented with a browser window where they can enter their credentials. The application then obtains an access token that is used to communicate with the desired cloud service. Alas, this approach is not suitable for headless IoT devices without the mouse and keyboard attached, or devices that only offer console I/O. -### Click [here](https://www.hackster.io/windows-iot/weather-station) to get started! +This problem is solved with the latest version of the Active Directory Authentication Library (still in preview) that introduces a new authentication flow tailored for headless devices. The approach goes like this: when a user authentication is required, instead of bringing up a browser window, the app asks the user to use another device to navigate to [https://aka.ms/devicelogin](https://aka.ms/devicelogin) and enter a specific code. Once the code is provided, the web page will lead the user through a normal authentication experience, including consent prompts and multi factor authentication if necessary. Upon successful authentication, the app will receive the required access tokens through a back channel and use it to access the desired cloud service. -### If you have v2 of the kit with a BME280 Click [here](https://www.hackster.io/windows-iot/weather-station-v-2-0-8abe16?auth_token=80b912d8d81919969ccab0080ddd8e2f) to get started! +## Hardware Setup +For this example, we will use a humidity and temperature sensor, such as the HTU21D, which is available from a number of vendors (e.g., Sparkfun, Amazon). + +The sensor connects to your device via I²C bus, as shown on the following wiring diagram (the location of the pins might be slightly different if you're using a device other than Raspberry Pi 2): + +![Humidity and temperature sensor](https://msdnshared.blob.core.windows.net/media/2016/01/humidity-htu21d_bb.png) + +## Software Setup +The software setup will require several steps. First, we'll need to register an application in the Azure Active Directory. Then, we'll copy the client ID from the application and use it in our UWP app running on the device. Finally, we'll create a dashboard in Power BI to visualize data coming from our device. + +### Registering an Application in Azure +This step assumes that your organization already has an Azure Active Directory set up. If not, you can get started here. + +You can register your application from the Azure Portal, however it's easier to do it from the dedicated Power BI application registration page [here](https://dev.powerbi.com/apps). + +Navigate to the above page, log in with your Power BI credentials and fill out the information about your app: + +![Power Bi app information](https://msdnshared.blob.core.windows.net/media/2016/01/Register_app_step2.png) + +Note that I used a dummy URL for the redirect -- our app will not need this information but we cannot leave this field empty. + +In the next step, enable the "Read All Datasets" and "Read and Write All Datasets" APIs and click "Register App". + +Once this is done, click "Register App". The web page will generate the Client ID, which looks like this: + +![Register your app](https://msdnshared.blob.core.windows.net/media/2016/01/Register_app_step4.png) + +Leave the browser page open -- we will need to copy the Client ID and paste it into our C# app. + +## Build the App +The C# app UWP that we're going to use combines the Power BI REST APIs with the use of headless device flow from the Azure Active Directory Library described [here](https://github.com/Azure-Samples/active-directory-dotnet-deviceprofile/). + +The full source of the app is available on our GitHub repository [here](https://github.com/ms-iot/samples/tree/develop/Azure/WeatherStation.PowerBI). + +To run your application on your device, you need to get the source code and find the clientID constant in PBIClient.cs: + +``` + // WeatherPBIApp: replace with the actual Client ID from the Azure Application: + private const string clientID = ""; +``` + +Replace the value with the string obtained from the registered Azure Application at the previous step and compile the app for ARM architecture. For this app, you will need to connect your Raspberry Pi to a monitor (keyboard and mouse are not required) to display the user code from the device. While this means that the device is no longer completely headless, you might imagine a slightly more advanced version of the app where the user code is communicated via an SMS message, an HTTP POST request, or is displayed on an [LED matrix](https://www.raspberrypi.org/products/sense-hat/). + +Deploy the app to your Raspberry Pi. If all goes well, you should see the following: + +![Running Raspberry Pi app](https://msdnshared.blob.core.windows.net/media/2016/01/App_running.png) + +Now switch to another device -- either a desktop PC or a phone and navigate to the specified URL. Type in the specified user code and press Continue: + +![Signing into application](https://msdnshared.blob.core.windows.net/media/2016/01/signin1.png) + +Once the user code is accepted, the application will receive the access code and start sending data to Power BI. + +### Configure Power BI Dashboard +Login to your [Power BI account](https://powerbi.microsoft.com/en-us/) and look for the "WeatherReport" dataset in the navigation bar on the left. In the Visualization pane create a "Temperature by Time" line chart: + +![Temperature by Time line chart](https://msdnshared.blob.core.windows.net/media/2016/01/TemperaturexTime.png) + +You can then create a "Humidity by Time" chart in a similar way. Alternatively, you can plot both temperature and humidity on the same axis. + +Now save your report and pin it to the dashboard. You should see something that looks like this: + +![Temperature and humidity charts](https://msdnshared.blob.core.windows.net/media/2016/01/dashboard.png) + +That's it! Enjoy your weather station! + +Want to learn more about using Power BI to visualize sensor data from IoT Core? Read the blog post [here](https://blogs.msdn.microsoft.com/iot/2016/01/26/using-power-bi-to-visualize-sensor-data-from-windows-10-iot-core/). From fd3e2319c6168a5655d24c079d44131d7127cd4c Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:41:39 -0700 Subject: [PATCH 03/19] Update Package.appxmanifest --- .../WeatherStation/CS/Package.appxmanifest | 30 ++++++++----------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/Samples/WeatherStation/CS/Package.appxmanifest b/Samples/WeatherStation/CS/Package.appxmanifest index 02aecf4cf..8f6b6e692 100644 --- a/Samples/WeatherStation/CS/Package.appxmanifest +++ b/Samples/WeatherStation/CS/Package.appxmanifest @@ -1,21 +1,20 @@ - + + IgnorableNamespaces="uap mp"> - + - WeatherStation + WeatherDataReporter MSFT Assets\StoreLogo.png @@ -29,23 +28,18 @@ - + + Description="WeatherDataReporter" + BackgroundColor="transparent"> + - - - - - - - From 11ec94c8d715a78eeb9b8a45e19c4ba64c14ddbb Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:41:56 -0700 Subject: [PATCH 04/19] Delete StartupTask.cs --- Samples/WeatherStation/CS/StartupTask.cs | 56 ------------------------ 1 file changed, 56 deletions(-) delete mode 100644 Samples/WeatherStation/CS/StartupTask.cs diff --git a/Samples/WeatherStation/CS/StartupTask.cs b/Samples/WeatherStation/CS/StartupTask.cs deleted file mode 100644 index c383d6392..000000000 --- a/Samples/WeatherStation/CS/StartupTask.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Net.Http; -using Windows.ApplicationModel.Background; -using Windows.Devices.I2c; -using Windows.Devices.Enumeration; -using Windows.System.Threading; - - -namespace WeatherStation -{ - public sealed class StartupTask : IBackgroundTask - { - BackgroundTaskDeferral deferral; - private ThreadPoolTimer timer; - I2cDevice sensor; - - public async void Run(IBackgroundTaskInstance taskInstance) - { - deferral = taskInstance.GetDeferral(); - - //Ox40 was determined by looking at the datasheet for the device - var controller = await I2cController.GetDefaultAsync(); - sensor = controller.GetDevice(new I2cConnectionSettings(0x40)); - - timer = ThreadPoolTimer.CreatePeriodicTimer(Timer_Tick, TimeSpan.FromMilliseconds(500)); - - } - - private void Timer_Tick(ThreadPoolTimer timer) - { - //Read temperature and humidity and send result to debugger output window - - byte[] tempCommand = new byte[1] { 0xE3 }; - byte[] tempData = new byte[2]; - sensor.WriteRead(tempCommand, tempData); - var rawTempReading = tempData[0] << 8 | tempData[1]; - var tempRatio = rawTempReading / (float)65536; - double temperature = (-46.85 + (175.72 * tempRatio)) * 9 / 5 + 32; - System.Diagnostics.Debug.WriteLine("Temp: " + temperature.ToString()); - - byte[] humidityCommand = new byte[1] { 0xE5 }; - byte[] humidityData = new byte[2]; - sensor.WriteRead(humidityCommand, humidityData); - var rawHumidityReading = humidityData[0] << 8 | humidityData[1]; - var humidityRatio = rawHumidityReading / (float)65536; - double humidity = -6 + (125 * humidityRatio); - System.Diagnostics.Debug.WriteLine("Humidity: " + humidity.ToString()); - - } - } -} From a302f8e8c07f908265a1451b08906219e0dc8e39 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:42:10 -0700 Subject: [PATCH 05/19] Delete WeatherStation.csproj --- .../WeatherStation/CS/WeatherStation.csproj | 131 ------------------ 1 file changed, 131 deletions(-) delete mode 100644 Samples/WeatherStation/CS/WeatherStation.csproj diff --git a/Samples/WeatherStation/CS/WeatherStation.csproj b/Samples/WeatherStation/CS/WeatherStation.csproj deleted file mode 100644 index be4ddfaa3..000000000 --- a/Samples/WeatherStation/CS/WeatherStation.csproj +++ /dev/null @@ -1,131 +0,0 @@ - - - - - Debug - x86 - {B9AFEEE5-701C-4D17-B301-E961C279A19D} - winmdobj - Properties - WeatherStation - WeatherStation - en-US - UAP - 10.0.17763.0 - 10.0.10240.0 - 14 - true - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - false - WeatherStation_TemporaryKey.pfx - true - true - win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot - - - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - ARM - false - prompt - true - - - bin\ARM\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - ARM - false - prompt - true - true - - - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x64 - false - prompt - true - - - bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x64 - false - prompt - true - true - - - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x86 - false - prompt - true - - - bin\x86\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x86 - false - prompt - true - true - - - - - - - - Designer - - - - - - - - - - - - - - - - 5.0.0 - - - - 14.0 - - - - \ No newline at end of file From 4cc8a746a3b319eedc54162ed3b305b67728a665 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:42:18 -0700 Subject: [PATCH 06/19] Delete WeatherStation_TemporaryKey.pfx --- .../CS/WeatherStation_TemporaryKey.pfx | Bin 2582 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Samples/WeatherStation/CS/WeatherStation_TemporaryKey.pfx diff --git a/Samples/WeatherStation/CS/WeatherStation_TemporaryKey.pfx b/Samples/WeatherStation/CS/WeatherStation_TemporaryKey.pfx deleted file mode 100644 index e780d33a69c32584b4cebdba42d05bc2c7fef06e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2582 zcmZWqc|6o>7yk{z7@5F%?E$?Ez0 z&9x@8{zrtW76h94d})KjeR)lztuN!BxcIsk&BVLUn>W-wmU>w{(-xwO7VZt|9KtW9 zEyh*s4f8Hi)(PN4Q^=8*$fE`q z+n3=Djdzt}i+0hx+m%QCqo6oG9WCYhDkIwdcZn$61|^zMH}J7C1+cDx)qhzRJKFYT zl|LxAwhWt^a99{-Sty&gwu%^jm9tc>o2=x-azL?_cBAuQwTU4~T^M?@pIi5Mm>Q9R zLKf=LRbnSsC70S}6<3SeISx5AG;&|-bK~wVx2xgU6jM+ScaJ# z+b>~DJPVgXA@0kOJ{?@!V>K^5Y!7S15^&1%_D*w!uhLT6l2U$DQD)ckhXQX3xZt;& zB~8H=sTV{?iP(rj7Sj)!j}@lN8V#`~uwKV-sP0ODVpf&;J4{4xa)$N8 zA=d+6lZo`wg;Q$6u^MbQbz-7?QE|Gq>ZF?D9cMvx>@0zlL3>ZJzJB75&<%Bo{lOMm zC)(y+3N4QBn{2^+u^Y`l(tf-RAmdg^fp^;SIO+MO6~EE5QucGrE-pV$w;-{s8?%Pb zDIM%&dL>)CoFIeC>KLNW#;j}9eZ2KshzLG`+L&`Xg_uk5+-GmH6o&TmT;sG?+PjFDEpUm;C^6CWv@Y7;+;faxv^kA?Xk{2ix}Ka-oGr~_CEHQq$1Tu4yI1(( zbwC4hi3#RasgnFwyf$`AwCKgjZm2=8s!8zq5JL$DJJA=HC;MQ3VKUwh4x6`fp`U!L zZ;`O`BsOVd#GiQ5-Grbl-h&#fa9FM}eg@Vouknr}<+#keLD$EF8=MxIuN3adBrH@Y ze^=ZJ+(tGOEFxqK&hhtm3B7<|1cN~U0Klyoq1PBeU=UgEJP2XHe;3dL9su?L5pV}Q zY32x!071Z*w*O?@06Z;HrC~q7gT}ejVj_U0VW(dzLBQZwoi{DQ0S*8W?(k1fPJ}tX zDXqX8Z~;sJ0!<`OlivTeZ~zKG(gZL7PFpD877fV&H)$M#hOmGf?II`|LeesDn#ug~ zKh=)3912dR&;Pp-gfW{;pGKpS=|BL@#r~54{r>=X*mKExl#gBd=Ku&M)7$Nf;*ln^ zreB&>(bG#)vGcWjDlw;T{jT1Bh#PJk65}u*%+Yh#QRA|FQXMnMgnR-SpP@dFbWy4< z%Xhih2J>E$fru$1Ik_A)a(#0L|7_IRXrCtKvb$`OENhY3&4pw-+q5*0#yQb(QbMWS z^}Q8eAEy1u(B5nM)?fLYPd^NY%C5oTdny>sWC;`V)AW{TXpdr-*+58B>EgT=+s>2Y zg$v3WX?8({J{~(yLldQqo5X@V%FYcJGzQ1?s%0F^U;U;w`+!Y1QxtdGItBX)14(;B z4za@YPgz3uuAJUc%0U1^?mW|T&5YqLj0Q5TN5tl1L~On%IcQ>mJ5W8z;>KqY{wSlp zTb8fvW2TW(dY`nrf>M01;$=Xw!+WtaSyHzoW5wa!eIcoIU0h`Ijvz;`buq&$MP+eq zd3*_u2~d2(zbFCv`K*x~RDbi3&+;+;`Xl0~3B*dud?~LvFFy3*TOrBt7u6Rd(11X!x5WlA)HGDW&klI5Z>>ay)oIk>t zHI(GPl9fd`LT&idIprJGmvqE$7Mdj_H@$N_OCeqPn7;c7rF$FS#IrH|l<xEXxQ9D!nGT z#Z?-vwiQ{CTQ8FuALmaFA;3l)Do#GWvE*)Dxv&vWi-IVO|N_5 zP40mDM336xW1^c}gcZYv@w;}_wq&E&{<6r5(lnVn z27wiB4qttkofoX6M0ehkba&^z&HyZiS0a#b1-Jkl!pLxqjh>Dd%xN{WbVZLy(twgy n^>o5J-8?gS{{(Z68bArHo9mFPwhtY)76ZaDx?*lWALzdUWA2?s From fb285ff97dfe9e13c320337849d9e34657648a45 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:42:25 -0700 Subject: [PATCH 07/19] Delete WeatherStation.sln --- Samples/WeatherStation/CS/WeatherStation.sln | 40 -------------------- 1 file changed, 40 deletions(-) delete mode 100644 Samples/WeatherStation/CS/WeatherStation.sln diff --git a/Samples/WeatherStation/CS/WeatherStation.sln b/Samples/WeatherStation/CS/WeatherStation.sln deleted file mode 100644 index a5fcd94ab..000000000 --- a/Samples/WeatherStation/CS/WeatherStation.sln +++ /dev/null @@ -1,40 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.22823.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeatherStation", "WeatherStation.csproj", "{B9AFEEE5-701C-4D17-B301-E961C279A19D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM = Debug|ARM - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|ARM = Release|ARM - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Debug|ARM.ActiveCfg = Debug|ARM - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Debug|ARM.Build.0 = Debug|ARM - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Debug|ARM.Deploy.0 = Debug|ARM - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Debug|x64.ActiveCfg = Debug|x64 - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Debug|x64.Build.0 = Debug|x64 - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Debug|x64.Deploy.0 = Debug|x64 - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Debug|x86.ActiveCfg = Debug|x86 - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Debug|x86.Build.0 = Debug|x86 - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Debug|x86.Deploy.0 = Debug|x86 - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Release|ARM.ActiveCfg = Release|ARM - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Release|ARM.Build.0 = Release|ARM - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Release|ARM.Deploy.0 = Release|ARM - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Release|x64.ActiveCfg = Release|x64 - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Release|x64.Build.0 = Release|x64 - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Release|x64.Deploy.0 = Release|x64 - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Release|x86.ActiveCfg = Release|x86 - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Release|x86.Build.0 = Release|x86 - {B9AFEEE5-701C-4D17-B301-E961C279A19D}.Release|x86.Deploy.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal From c046c491a5fd4c9e3e37135dc500f137dbada2cb Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:43:16 -0700 Subject: [PATCH 08/19] Update AssemblyInfo.cs --- Samples/WeatherStation/CS/Properties/AssemblyInfo.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Samples/WeatherStation/CS/Properties/AssemblyInfo.cs b/Samples/WeatherStation/CS/Properties/AssemblyInfo.cs index 84f12554e..7c7c1edf3 100644 --- a/Samples/WeatherStation/CS/Properties/AssemblyInfo.cs +++ b/Samples/WeatherStation/CS/Properties/AssemblyInfo.cs @@ -1,18 +1,15 @@ -// Copyright (c) Microsoft. All rights reserved. - - -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("WeatherStation")] +[assembly: AssemblyTitle("WeatherDataReporter")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("WeatherStation")] +[assembly: AssemblyProduct("WeatherDataReporter")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -29,4 +26,4 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] \ No newline at end of file +[assembly: ComVisible(false)] From a18383adc578f7448b5cae413092571d737f52e9 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:44:06 -0700 Subject: [PATCH 09/19] Create App.xaml --- Samples/WeatherStation/CS/App.xaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Samples/WeatherStation/CS/App.xaml diff --git a/Samples/WeatherStation/CS/App.xaml b/Samples/WeatherStation/CS/App.xaml new file mode 100644 index 000000000..88cbb91f7 --- /dev/null +++ b/Samples/WeatherStation/CS/App.xaml @@ -0,0 +1,8 @@ + + + From 72ecc5e74b0aac8a22098f6e5ecc1c9bc33416f4 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:44:30 -0700 Subject: [PATCH 10/19] Create App.xaml.cs --- Samples/WeatherStation/CS/App.xaml.cs | 97 +++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 Samples/WeatherStation/CS/App.xaml.cs diff --git a/Samples/WeatherStation/CS/App.xaml.cs b/Samples/WeatherStation/CS/App.xaml.cs new file mode 100644 index 000000000..1d18afc15 --- /dev/null +++ b/Samples/WeatherStation/CS/App.xaml.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +namespace WeatherDataReporter +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + sealed partial class App : Application + { + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + this.Suspending += OnSuspending; + } + + /// + /// Invoked when the application is launched normally by the end user. Other entry points + /// will be used such as when the application is launched to open a specific file. + /// + /// Details about the launch request and process. + protected override void OnLaunched(LaunchActivatedEventArgs e) + { + Frame rootFrame = Window.Current.Content as Frame; + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + if (rootFrame == null) + { + // Create a Frame to act as the navigation context and navigate to the first page + rootFrame = new Frame(); + + rootFrame.NavigationFailed += OnNavigationFailed; + + if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) + { + //TODO: Load state from previously suspended application + } + + // Place the frame in the current Window + Window.Current.Content = rootFrame; + } + + if (rootFrame.Content == null) + { + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter + rootFrame.Navigate(typeof(MainPage), e.Arguments); + } + // Ensure the current window is active + Window.Current.Activate(); + } + + /// + /// Invoked when Navigation to a certain page fails + /// + /// The Frame which failed navigation + /// Details about the navigation failure + void OnNavigationFailed(object sender, NavigationFailedEventArgs e) + { + throw new Exception("Failed to load Page " + e.SourcePageType.FullName); + } + + /// + /// Invoked when application execution is being suspended. Application state is saved + /// without knowing whether the application will be terminated or resumed with the contents + /// of memory still intact. + /// + /// The source of the suspend request. + /// Details about the suspend request. + private void OnSuspending(object sender, SuspendingEventArgs e) + { + var deferral = e.SuspendingOperation.GetDeferral(); + //TODO: Save application state and stop any background activity + deferral.Complete(); + } + } +} From 171469f02ab031e249eca49485c207f69174c9a5 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:44:52 -0700 Subject: [PATCH 11/19] Create ConnectionStrings.cs --- Samples/WeatherStation/CS/ConnectionStrings.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Samples/WeatherStation/CS/ConnectionStrings.cs diff --git a/Samples/WeatherStation/CS/ConnectionStrings.cs b/Samples/WeatherStation/CS/ConnectionStrings.cs new file mode 100644 index 000000000..db40378ba --- /dev/null +++ b/Samples/WeatherStation/CS/ConnectionStrings.cs @@ -0,0 +1,11 @@ +using Windows.UI.Xaml.Controls; + +namespace WeatherDataReporter +{ + public sealed partial class MainPage : Page + { + static string iotHubUri = "{replace}"; + static string deviceKey = "{replace}"; + static string deviceId = "{replace}"; + } +} From 263163f70785fcbc386d95a4c83dcabf2500484e Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:46:18 -0700 Subject: [PATCH 12/19] Create IWeatherDataProvider.cs --- Samples/WeatherStation/CS/IWeatherDataProvider.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Samples/WeatherStation/CS/IWeatherDataProvider.cs diff --git a/Samples/WeatherStation/CS/IWeatherDataProvider.cs b/Samples/WeatherStation/CS/IWeatherDataProvider.cs new file mode 100644 index 000000000..d233a07ca --- /dev/null +++ b/Samples/WeatherStation/CS/IWeatherDataProvider.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WeatherDataReporter +{ + interface IWeatherDataProvider + { + double GetTemperature(); + double GetHumidity(); + } +} From 5309975bf80d47cb30f4a27e8108094ca985683d Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:46:37 -0700 Subject: [PATCH 13/19] Create MainPage.xaml --- Samples/WeatherStation/CS/MainPage.xaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Samples/WeatherStation/CS/MainPage.xaml diff --git a/Samples/WeatherStation/CS/MainPage.xaml b/Samples/WeatherStation/CS/MainPage.xaml new file mode 100644 index 000000000..ba9e79341 --- /dev/null +++ b/Samples/WeatherStation/CS/MainPage.xaml @@ -0,0 +1,16 @@ + + + + + + + + + From e4230cf9f26a90de3028d82d44c6eb64a3936f53 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:47:03 -0700 Subject: [PATCH 14/19] Create MainPage.xaml.cs --- Samples/WeatherStation/CS/MainPage.xaml.cs | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Samples/WeatherStation/CS/MainPage.xaml.cs diff --git a/Samples/WeatherStation/CS/MainPage.xaml.cs b/Samples/WeatherStation/CS/MainPage.xaml.cs new file mode 100644 index 000000000..f10d986c1 --- /dev/null +++ b/Samples/WeatherStation/CS/MainPage.xaml.cs @@ -0,0 +1,55 @@ +using System; +using System.Diagnostics; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Azure.Devices.Client; +using Newtonsoft.Json; +using Windows.UI.Xaml.Controls; + +namespace WeatherDataReporter +{ + public sealed partial class MainPage : Page + { + static DeviceClient deviceClient; + + public MainPage() + { + this.InitializeComponent(); + + deviceClient = DeviceClient.Create(iotHubUri, AuthenticationMethodFactory.CreateAuthenticationWithRegistrySymmetricKey(deviceId, deviceKey), TransportType.Http1); + + SendDeviceToCloudMessagesAsync(); + } + + private async void SendDeviceToCloudMessagesAsync() + { + //var weatherDataprovider = await WeatherDataProvider.Create(); + + // Use this if you don't have a real sensor: + var weatherDataprovider = await SimulatedWeatherDataProvider.Create(); + + while (true) + { + double currentHumidity = weatherDataprovider.GetHumidity(); + double currentTemperature = weatherDataprovider.GetTemperature(); + + var telemetryDataPoint = new + { + time = DateTime.Now.ToString(), + deviceId = deviceId, + currentHumidity = currentHumidity, + currentTemperature = currentTemperature + }; + var messageString = JsonConvert.SerializeObject(telemetryDataPoint); + var message = new Message(Encoding.ASCII.GetBytes(messageString)); + + await deviceClient.SendEventAsync(message); + Debug.WriteLine("{0} > Sending message: {1}", DateTime.Now, messageString); + + this.listView.Items.Insert(0, messageString); + + await Task.Delay(1000); + } + } + } +} From 0f9b511464ad5a51221167c92286cf50eea5f550 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:47:33 -0700 Subject: [PATCH 15/19] Create SimulatedWeatherDataProvider.cs --- .../CS/SimulatedWeatherDataProvider.cs | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Samples/WeatherStation/CS/SimulatedWeatherDataProvider.cs diff --git a/Samples/WeatherStation/CS/SimulatedWeatherDataProvider.cs b/Samples/WeatherStation/CS/SimulatedWeatherDataProvider.cs new file mode 100644 index 000000000..5c1b0ee16 --- /dev/null +++ b/Samples/WeatherStation/CS/SimulatedWeatherDataProvider.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WeatherDataReporter +{ + class SimulatedWeatherDataProvider : IWeatherDataProvider + { + private int i = 0; + private const int delay = 1000; + private const int humPeriod = 20 * delay; + private const int humMin = 60; + private const int humMax = 80; + + private const int tempPeriod = 25 * delay; + private const int tempMin = 68; + private const int tempMax = 82; + + private static readonly Random rnd = new Random(); + + public static Task Create() + { + return Task.FromResult(new SimulatedWeatherDataProvider()); + } + + static private double CalculateNextValue(int i, int period, int min, int max) + { + double x = Math.PI * (((double)i * delay) / period); + double val = ((1.0 + Math.Sin(x)) / 2.0) * (max - min) + min; + + // Add random fluctuation + if (true) + { + var delta = (double)rnd.Next(min - max, max - min); + val += delta / 20; + } + + return val; + } + + public double GetHumidity() + { + return CalculateNextValue(i++, humPeriod, humMin, humMax); + } + + public double GetTemperature() + { + return CalculateNextValue(i++, tempPeriod, tempMin, tempMax); + } + } +} From 1e01a14207cf0a419a50fd3671e7623c481c6899 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:48:03 -0700 Subject: [PATCH 16/19] Create WeatherDataProvider.cs --- .../WeatherStation/CS/WeatherDataProvider.cs | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Samples/WeatherStation/CS/WeatherDataProvider.cs diff --git a/Samples/WeatherStation/CS/WeatherDataProvider.cs b/Samples/WeatherStation/CS/WeatherDataProvider.cs new file mode 100644 index 000000000..373372efb --- /dev/null +++ b/Samples/WeatherStation/CS/WeatherDataProvider.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Windows.Devices.I2c; +using Windows.Devices.Enumeration; + +namespace WeatherDataReporter +{ + class WeatherDataProvider + { + public static async Task Create() + { + String aqs = I2cDevice.GetDeviceSelector("I2C1"); + IReadOnlyList dis = await DeviceInformation.FindAllAsync(aqs); + //Ox40 was determined by looking at the datasheet for the device + var sensor = await I2cDevice.FromIdAsync(dis[0].Id, new I2cConnectionSettings(0x40)); + return new WeatherDataProvider(sensor); + } + + private I2cDevice sensor; + + private WeatherDataProvider(I2cDevice sensor) + { + this.sensor = sensor; + } + + public double GetHumidity() + { + byte[] humidityCommand = new byte[1] { 0xE5 }; + byte[] humidityData = new byte[2]; + try + { + sensor.WriteRead(humidityCommand, humidityData); + var rawHumidityReading = humidityData[0] << 8 | humidityData[1]; + var humidityRatio = rawHumidityReading / (float)65536; + double humidity = -6 + (125 * humidityRatio); + return humidity; + } + catch (Exception) + { + return 0.0; + } + } + + public double GetTemperature() + { + try + { + byte[] tempCommand = new byte[1] { 0xE3 }; + byte[] tempData = new byte[2]; + sensor.WriteRead(tempCommand, tempData); + var rawTempReading = tempData[0] << 8 | tempData[1]; + var tempRatio = rawTempReading / (float)65536; + double temperature = -46.85 + (175.72 * tempRatio); + return temperature; + } + catch (Exception) + { + return 0.0; + } + } + } +} From 7531740b7c97b239ed23618009d208c1a7c1edac Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:48:26 -0700 Subject: [PATCH 17/19] Create WeatherDataReporter.csproj --- .../CS/WeatherDataReporter.csproj | 153 ++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 Samples/WeatherStation/CS/WeatherDataReporter.csproj diff --git a/Samples/WeatherStation/CS/WeatherDataReporter.csproj b/Samples/WeatherStation/CS/WeatherDataReporter.csproj new file mode 100644 index 000000000..5e43e649c --- /dev/null +++ b/Samples/WeatherStation/CS/WeatherDataReporter.csproj @@ -0,0 +1,153 @@ + + + + + Debug + x86 + {89E9D605-9869-4185-83B8-DF321AACE7C7} + AppContainerExe + Properties + WeatherDataReporter + WeatherDataReporter + en-US + UAP + 10.0.17763.0 + 10.0.10240.0 + 14 + true + 512 + {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WeatherDataReporter_TemporaryKey.pfx + win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot + + + true + bin\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + ARM + false + prompt + true + + + bin\ARM\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + ARM + false + prompt + true + true + + + true + bin\x64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x64 + false + prompt + true + + + bin\x64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x64 + false + prompt + true + true + + + true + bin\x86\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x86 + false + prompt + true + + + bin\x86\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x86 + false + prompt + true + true + + + + App.xaml + + + + + MainPage.xaml + + + + + + + + Designer + + + + + + + + + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + + + 1.0.0-preview-005 + + + 5.0.0 + + + 8.0.1-beta1 + + + + 14.0 + + + + From 92a8917939daa149c8781b9eb54ae34818480d1b Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:48:51 -0700 Subject: [PATCH 18/19] Create WeatherDataReporter.sln --- .../WeatherStation/CS/WeatherDataReporter.sln | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Samples/WeatherStation/CS/WeatherDataReporter.sln diff --git a/Samples/WeatherStation/CS/WeatherDataReporter.sln b/Samples/WeatherStation/CS/WeatherDataReporter.sln new file mode 100644 index 000000000..3ef4a10fe --- /dev/null +++ b/Samples/WeatherStation/CS/WeatherDataReporter.sln @@ -0,0 +1,40 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeatherDataReporter", "WeatherDataReporter.csproj", "{89E9D605-9869-4185-83B8-DF321AACE7C7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Debug|ARM.ActiveCfg = Debug|ARM + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Debug|ARM.Build.0 = Debug|ARM + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Debug|ARM.Deploy.0 = Debug|ARM + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Debug|x64.ActiveCfg = Debug|x64 + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Debug|x64.Build.0 = Debug|x64 + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Debug|x64.Deploy.0 = Debug|x64 + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Debug|x86.ActiveCfg = Debug|x86 + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Debug|x86.Build.0 = Debug|x86 + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Debug|x86.Deploy.0 = Debug|x86 + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Release|ARM.ActiveCfg = Release|ARM + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Release|ARM.Build.0 = Release|ARM + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Release|ARM.Deploy.0 = Release|ARM + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Release|x64.ActiveCfg = Release|x64 + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Release|x64.Build.0 = Release|x64 + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Release|x64.Deploy.0 = Release|x64 + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Release|x86.ActiveCfg = Release|x86 + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Release|x86.Build.0 = Release|x86 + {89E9D605-9869-4185-83B8-DF321AACE7C7}.Release|x86.Deploy.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal From 0d7b4c58588a1c7c81f8b2327dc276cd22a1b2a2 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 16 Aug 2019 14:49:21 -0700 Subject: [PATCH 19/19] Add files via upload --- .../CS/WeatherDataReporter_TemporaryKey.pfx | Bin 0 -> 2582 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Samples/WeatherStation/CS/WeatherDataReporter_TemporaryKey.pfx diff --git a/Samples/WeatherStation/CS/WeatherDataReporter_TemporaryKey.pfx b/Samples/WeatherStation/CS/WeatherDataReporter_TemporaryKey.pfx new file mode 100644 index 0000000000000000000000000000000000000000..e780d33a69c32584b4cebdba42d05bc2c7fef06e GIT binary patch literal 2582 zcmZWqc|6o>7yk{z7@5F%?E$?Ez0 z&9x@8{zrtW76h94d})KjeR)lztuN!BxcIsk&BVLUn>W-wmU>w{(-xwO7VZt|9KtW9 zEyh*s4f8Hi)(PN4Q^=8*$fE`q z+n3=Djdzt}i+0hx+m%QCqo6oG9WCYhDkIwdcZn$61|^zMH}J7C1+cDx)qhzRJKFYT zl|LxAwhWt^a99{-Sty&gwu%^jm9tc>o2=x-azL?_cBAuQwTU4~T^M?@pIi5Mm>Q9R zLKf=LRbnSsC70S}6<3SeISx5AG;&|-bK~wVx2xgU6jM+ScaJ# z+b>~DJPVgXA@0kOJ{?@!V>K^5Y!7S15^&1%_D*w!uhLT6l2U$DQD)ckhXQX3xZt;& zB~8H=sTV{?iP(rj7Sj)!j}@lN8V#`~uwKV-sP0ODVpf&;J4{4xa)$N8 zA=d+6lZo`wg;Q$6u^MbQbz-7?QE|Gq>ZF?D9cMvx>@0zlL3>ZJzJB75&<%Bo{lOMm zC)(y+3N4QBn{2^+u^Y`l(tf-RAmdg^fp^;SIO+MO6~EE5QucGrE-pV$w;-{s8?%Pb zDIM%&dL>)CoFIeC>KLNW#;j}9eZ2KshzLG`+L&`Xg_uk5+-GmH6o&TmT;sG?+PjFDEpUm;C^6CWv@Y7;+;faxv^kA?Xk{2ix}Ka-oGr~_CEHQq$1Tu4yI1(( zbwC4hi3#RasgnFwyf$`AwCKgjZm2=8s!8zq5JL$DJJA=HC;MQ3VKUwh4x6`fp`U!L zZ;`O`BsOVd#GiQ5-Grbl-h&#fa9FM}eg@Vouknr}<+#keLD$EF8=MxIuN3adBrH@Y ze^=ZJ+(tGOEFxqK&hhtm3B7<|1cN~U0Klyoq1PBeU=UgEJP2XHe;3dL9su?L5pV}Q zY32x!071Z*w*O?@06Z;HrC~q7gT}ejVj_U0VW(dzLBQZwoi{DQ0S*8W?(k1fPJ}tX zDXqX8Z~;sJ0!<`OlivTeZ~zKG(gZL7PFpD877fV&H)$M#hOmGf?II`|LeesDn#ug~ zKh=)3912dR&;Pp-gfW{;pGKpS=|BL@#r~54{r>=X*mKExl#gBd=Ku&M)7$Nf;*ln^ zreB&>(bG#)vGcWjDlw;T{jT1Bh#PJk65}u*%+Yh#QRA|FQXMnMgnR-SpP@dFbWy4< z%Xhih2J>E$fru$1Ik_A)a(#0L|7_IRXrCtKvb$`OENhY3&4pw-+q5*0#yQb(QbMWS z^}Q8eAEy1u(B5nM)?fLYPd^NY%C5oTdny>sWC;`V)AW{TXpdr-*+58B>EgT=+s>2Y zg$v3WX?8({J{~(yLldQqo5X@V%FYcJGzQ1?s%0F^U;U;w`+!Y1QxtdGItBX)14(;B z4za@YPgz3uuAJUc%0U1^?mW|T&5YqLj0Q5TN5tl1L~On%IcQ>mJ5W8z;>KqY{wSlp zTb8fvW2TW(dY`nrf>M01;$=Xw!+WtaSyHzoW5wa!eIcoIU0h`Ijvz;`buq&$MP+eq zd3*_u2~d2(zbFCv`K*x~RDbi3&+;+;`Xl0~3B*dud?~LvFFy3*TOrBt7u6Rd(11X!x5WlA)HGDW&klI5Z>>ay)oIk>t zHI(GPl9fd`LT&idIprJGmvqE$7Mdj_H@$N_OCeqPn7;c7rF$FS#IrH|l<xEXxQ9D!nGT z#Z?-vwiQ{CTQ8FuALmaFA;3l)Do#GWvE*)Dxv&vWi-IVO|N_5 zP40mDM336xW1^c}gcZYv@w;}_wq&E&{<6r5(lnVn z27wiB4qttkofoX6M0ehkba&^z&HyZiS0a#b1-Jkl!pLxqjh>Dd%xN{WbVZLy(twgy n^>o5J-8?gS{{(Z68bArHo9mFPwhtY)76ZaDx?*lWALzdUWA2?s literal 0 HcmV?d00001