Getting started with Windows Internet of Things (Windows IoT)


With just a few items you can get started building apps for Windows Internet of Things using VB, C# or C++ on a Raspberry Pi 3.

The Pi is a small quad core 64 bit ARM processor clocked at 1.2 GHz. It has built in blue tooth, WiFi, Ethernet, HDMI, and 4 USB ports. Read that list again. It’s pretty amazing to get all that functionality in a credit card sized computer for < $40. It’s easy to make a streaming videos media center, a robot controller, WiFi security system, etc.

The Pi has general purpose I/O pins that can be used to connect to electronic components, such as accelerometers, pressure sensors, LCD screens. What’s more, there are both an SPI bus and an I2c bus (“i squared c”, or inter-inter-circuit) which is useful for connecting many devices on the same circuit board with few connections. I’ve used the I2c bus to connect to a Digital to Analog Converter to generate and display waveforms for a speaker and on my oscilloscope.

Raspberry Pi 3

This is just the motherboard, with no memory card. You can get some of the many Raspberry Pi starter kits that include other goodies, such as a power supply, a memory card, an electronic breadboard, miscellaneous electronic components.

 

39.44

16 G Class 10 MicroSD Memory Card

This is to store the OS’s for the PI. It’s fast enough to give good performance. I’ve installed up to 4 different OS’s on it.

 

8.40

7" TouchScreen Display

You can connect any HDMI display, but this touchscreen integrates nicely with the Pi. There are instructional videos on YouTube.

Optional

70.92

TouchScreen Case

This one fits nicely to enclose the Pi and the display. Both can be powered with one MicroUSB connector. It has plenty of room to let cables out the back for connecting to your breadboard, and it also can wall mount your creation. It has feet and sits nicely on a desk.

Optional

11.47

Mini Wireless Keyboard

You can use any USB mouse/Keyboard. You could use desktop ones, but it’s nice to use a small one that combines mouse with keyboard. Useful for setting up WiFi connections for each installed OS. Also useful as a media center remote control for the Pi

Optional

17.99

Micro USB Power supply

A 5 volt Micro USB power supply. You’ll need a beefy 5V power supply especially if you’re powering both the Pi and the TouchScreen.

 

9.99

Micro USB cable for power

You might have one of these lying around for charging various items. These ones are retractable.

Optional

9.25

Memory card reader/writer

A memory card reader to write to the memory card. Your computer might already have one, or you might have one available. (I used the Surface Pro reader under the kickstand)

   

Once you have your Pi, you need to install some software on it. You could install an OS directly, but why not install Noobs?

Noobs Lite is a very light weight operating system installer/manager for Raspberry Pi. It listens to the USB keyboard/mouse or the Touch Screen.

Noobs’ main purpose is to allow you to connect to a network (WiFi or Ethernet) to download and install other operating systems for the Pi (such as Raspbian. Windows IOT, or various media players.) It responds to the touchscreen or USB keyboard.

After the OS’s have been installed, it presents a screen upon each boot which allows you to select which operating system to start, defaulting to the last one chosen. (you can also edit the config files for the installed OS’s.  My touch screen display was upside down: just use Noobs edit each OS’s config.txt file and add the line “lcd_rotate=2”)

The Windows IOT dashboard allows you to initialize a memory card with Windows IOT, but that means it will have only one OS: you will not be able to play around with the other OS’s. The dashboard also lets you change the network name (and password) of the Pi, optionally create/connect to an Azure account.

Take the new memory card, put it in the card reader. If it’s not formatted, format the disk using Windows File Explorer (Right click->Format. Use the default options.) Then just double click the downloaded NOOBs.zip file, select all the files, and paste them onto the memory card, which puts them in place unzipped.

Insert the memory card into the Pi and plug in the Micro USB cable for power, monitor to HDMI (if you don’t use the touchscreen), booting up NOOBs.

While NOOBS is installing the chosen OS’s, a couple dialogs come up when it’s installing Windows IOT: one asking which version of Windows IOT to install: RTM, or Insider Preview. The other asks whether you agree to the usage license. It’s good to have a keyboard attached, but it also responds to touch screen. The whole NOOBs installation process with 4 OS’s took about 25 minutes.

You can also use an Ethernet cable to connect the Pi. Just plug it into the onboard Ethernet connector. The Windows IOT display shows the IP address, and the IOT dashboard allows you to change the machine name and the admin password (which defaults to p@ssw0rd)

Try booting into the various OS’s and play around. It’s nice to have the Raspberry Pi be a full media center, able to play videos from dozens of sources.

Be careful about under-powering the PI: see this post about under voltage USB supplies.

When running Windows IOT, the Pi serves up web pages that show status of the Pi, (even if the Pi is headless (has no display)). The web address is the network name of the Pi at port 8080: e.g. something like http://MyPiName:8080 )

From Visual Studio 2015 Update 3 or later:

File->New->Project->C#->Blank App (Universal Windows)

Right click on Solution->Manage NuGet packages for solution

Find Microsoft.NETCore.UniversalWindowsPlatform and install it for the project in your solution

For Visual Studio 2017, make sure the VS Installer includes the SDK version you want to target. Choose IndividualComponents->SDKs , libraries, and frameworks:

clip_image001

You can see which versions you might have installed at C:\Program Files (x86)\Windows Kits\10\Platforms\UAP

The Universal App you create can run on any Windows platform, like Windows Desktop, Windows IOT, Windows Phone, Xbox, Hololens. It’s pretty easy to switch between debugging and running locally and on the Raspberry Pi.

You can use the Visual Studio MarketPlace (Tools->Extensions and Updates->Online) to search for “Window IoT Core Project Templates” (versions for both VS 2015 and 2017). This has a template to create a new C#->Windows->Windows IoTCore->Background Application, which is a program that runs on a headless Raspberry PI: one that has no display.

Building an app for Raspberry Pi is easier in a few ways than building for Arduino: the Arduino needs to be connected to the PC via USB to download programs (Yes, you can use Visual Studio to build and debug Arduino apps), whereas the Pi just needs to be anywhere on the (wireless) network.

You can use the Windows IOT Remote Client to see the screen of your IOT device. See these instructions. It allows you to use your Win 10 main machine running Visual Studio (or even a Windows Phone) to view the IOT device remotely. The Remote Client also allows touch, mouse and keyboard events to go to the Pi, even if there’s no screen attached to the IOT device.

See also https://developer.microsoft.com/en-us/windows/iot/docs/buildingappsforiotcore

Comments (0)

Skip to main content