Getting started with Windows 10 IoT

Now that I have a Raspberry at my disposal, it is possible to install Windows 10 IoT on it and explore what Microsoft have made available for the Pi. Why would I run Windows 10 IoT on a Raspberry? I don’t know yet, but as Windows 10 IoT is free, let’s try it out!

For my experiments I used this setup:

  • Windows 10 with Visual Studio 2015
  • Windows IoT version 10.0.10586.0

Setting things up and connect to the device

The main steps for getting started developing are:

  1. For Visual Studio, download and install the IoT project templates from the VS Gallery
  2. Enable developer mode in Windows 10
  3. Download and install the Windows IoT core tools
  4. Download and flash Windows 10 IoT on an SD card

Sound simple, right? Actually, it was quite cumbersome when getting to the details and I had to redo the SD flash part after Windows IoT became corrupted and refused to boot properly (the sad 😦 prompt seems to be inherited from other versions of Windows).

There is a detailed instruction on how to setup a Raspberry Pi 2 with Windows IoT hereIn short, you need to download & install the IoT tools, download the Windows IoT image for RPi2, use the IoTCoreImageHelper (located in C:\Program Files (x86)\Microsoft IoT) to flash the SD card. Then you can put the SD card on your RPi2 and boot for the first time.

Ok, so far, no big issues. Windows IoT boots but it’s not possible to configure anything at all from the GUI on the actual device itself. You need to do this from the Device Portal via a web browser. The address to the Device Portal is the ip for your device with port 8080 (the default Administrator password is p@ssw0rd). You can also use the IoT Dashboard on your Windows dev machine to browse available device on the network and start the Device Portal from there.

The big problem I had with this part was that the device was not visible as a Win IoT device on my network. I could ping the ip but not access the device portal. To get around this, I created a shared network connection in Windows and connected the device and my dev machine with an ethernet cable. With this hardwired link, my dev machine would find the device and I could configure it via the (web) Device Portal.

The first thing you are likely to do is give the device a name and change the default password. Ok, connected and configured. Now let’s try to deploy an app!

Hello Blink

The equivalent to Hello World for an IoT-device must be a blinking LED. A sample to start with is available here:

https://ms-iot.github.io/content/en-US/win10/samples/Blinky.htm

After building the project, you can deploy it to your connected device. It’s an UWP app with a GUI that blinks on the screen at the same time as a GPIO-pin voltage is altered to enable a blinking LED on a breadboard.

blinky_small.jpg

To test a minimal Blinky/Hello LED, you can instead create a Background App (no GUI). A sample is available here:

https://ms-iot.github.io/content/en-US/win10/samples/BlinkyHeadless.htm

Win IoT can run in headed (with GUI=default) or headless (no GUI) mode. You can do this configuration via a Powershell connection to the device. Follow these steps:

https://ms-iot.github.io/content/en-US/win10/samples/PowerShell.htm

https://ms-iot.github.io/content/en-US/win10/HeadlessMode.htm

When I switched to headless mode, my Windows IoT went into “endless” mode instead (i.e. eternal hourglass glass when booting). I have not yet figured out what the problem is, but I could (via Powershell) switch back to headed mode and reboot.

Verdict

Using Win IoT for blinking a LED is totally overkill. I might get back to Win IoT when I can find a real use case for it. It is nice to be able to program hardware via Visual Studio and C#, but for my upcoming hardware experiments I will use the simple Arduino with the Arduino IDE or a Raspberry Pi with Raspbian Python instead.

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s