ms-iot/iot-build-lab

Name: iot-build-lab

Owner: ms-iot

Description: Code for the 2015 //build IoT hands on lab.

Created: 2015-03-10 17:29:18.0

Updated: 2018-04-30 19:19:39.0

Pushed: 2016-07-01 21:35:58.0

Homepage: null

Size: 346

Language: C#

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Raspberry Pi 2 with Windows IoT Core setup

This Wiki explains how to setup a Raspberry Pi 2 running Windows IoT Core to send temperature. Humidity, altitude, pressure data to Microsoft Azure for analytics, real time data display, and alerts. It assumes that you have all the necessary hardware and tools installed (see below)

Hardware requirements

To setup the Raspberry Pi 2 to run Windows IoT Core, follow the instructions here

You need to wire the Raspberry Pi 2 with the Weather Shield. Pinning diagram can be found on Hackster.io

Software and tools requirements

You can find all the instructions and links to prepare your dev environment for Windows IoT Core on the Raspberry Pi 2 []here](http://ms-iot.github.io/content/win10/SetupPC.htm)

Getting Started

You can retrieve the Host, User, and Password strings by

  1. launching http://manage.windowsazure.com
  2. selecting Service Bus in the left nav menu
  3. picking your Namespace (used for serviceBusNamespace)
  4. select Event Hubs from the top menu
  5. select ehdevices (this value is used for eventHubName but should not need to be modified)
  6. select Connection Information tab at the bottom (used for keyName and key)
        // Initialize ConnectTheDots Settings
        localSettings.ServicebusNamespace = "YOURSERVICEBUS-ns";
        localSettings.EventHubName = "ehdevices";
        localSettings.KeyName = "D1";
        localSettings.Key = "YOUR_KEY";
        localSettings.DisplayName = "YOUR_DEVICE_NAME";
        localSettings.Organization = "YOUR_ORGANIZATION_OR_SELF";
        localSettings.Location = "YOUR_LOCATION";
Building and Deploying the app

At this point you can build and deploy the application. If you are not familiar with creating apps for Windows IoT Core, you can find detailed instructions on how to connect to the device from Visual Studio, deploy and debug your app here

In order to ensure you are talking to the right robot kit in the room, right click on the project in the project explorer and click on properties. in the project properties page, choose the Debug tab and ensure that the Target Device is set to Remote Machine and that the Remote Machine fields has the IP address written on the post it on the table at your station. It is as simple as that. A remote debugger client is running on the Windows image on the Pi that allows the deployment of the app and the remote debugging.

Ensure that in the Visual Studio Ribbon you have ARM as the configuration (NOT x64 or x86 as the Pi is an ARM device) and that the target device is set to Remote Machine. Press F5 to deploy and start the app.

Make the app launch at boot

With Windows IoT Core you can set a Universal app as the default app, meaning that the app will be launched at boot and that a watchdog service will ensure the app is relaunched if crashed. In order to set your app as default, you need to use a PowerShell remote session (see here for instructions on how to establish remote PowerShell session). To make your app the default one, follow the steps highlighted at the end of this sample.

===

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.