Tuesday, March 1, 2016

Windows IoT Core on Raspberry Pi 2

Pre-requisite

If you want to run Windows IoT Core on your RPI, you must have a desktop computer running Windows 10. The tools used to prepare the SD card cannot run otherwise.

Download tools

Go to : http://ms-iot.github.io/content/en-US/Downloads.htm
and download:

  • IoT Dashboard
  • Windows IoT for Raspberry Pi 2 (iso image)


Install the dashboard.
Open the iso image and run the *.msi installer.

Prepare SD card

Plug the SD card to your desktop computer.

As explained here, start the IoT Dashboard and follow the instructions (Set-up a new device -> ...).

Boot

Plug the SD Card to your raspberry pi and power it up. After a long minute, this is what you should see on the screen:



Select your language, and here your are, on your Windows Iot Core "desktop"




Windows IoT has no GUI stack and no command line prompt (but supports remote PowerShell connections). It is a minimalist operating system (or core) with Microsoft's Universal Application Platform (UAP) that is intended to run custom applications.


Write and deploy an App

Download Visual Studio 2015 Community and install it on your desktop computer.
During install, make sure to check the custom installation checkbox and select Universal Windows App Development Tools -> Tools and Windows SDK.

Start Visual Studio and Click on New Project.
Select Visual C# -> Windows -> Universal -> Blank Project.
Name it and click OK.

The Windows IoT COre image comes now without msvsmon.exe, the debugger listener required to deploy/debug on your raspberry pi. The first thing to do is to select "ARM" for the platform instead of x86 and "Remote machine" on the left. A popup will appear to select the remote device: normally, you should see your device in the list. Otherwise, enter its IP address or name.
Select Universal for the authentication method and click OK.
Now build and deploy your application. On the first deployment, Visual Studio will ship the debugger tools to your remote device. At the end of the process, your app should be running on your raspberry pi.

Note: Having a Windows 10 desktop computer is mandatory. You won't be able to deploy with an older version.
Note: Ensure that the "Update 1" is already installed with your Visual Studio setup (otherwise try to install from here)


0 comments:

Post a Comment