Lab Notes: Exploring Windows 10 IoT Core and the Raspberry Pi

Phillip Espinoza
Mission Data Journal
6 min readNov 11, 2016

In order to better consult current and future clients, we have recently been exploring Internet of Things (IoT) development platforms. After creating an Internet-connected climate monitoring system using a Particle Photon, our next step was to turn our attention to Microsoft and see what their platform has to offer.

Launched in August of 2015, Windows 10 IoT Core is a considerably recent OS developed and released by Microsoft for free download. It is designed for IoT applications on devices currently including the Raspberry Pi 2 and 3, Dragonboard 410c, Intel Joule, and Minnowboard Max. Although it is not meant to be used like the desktop version of Windows 10, a device running Windows 10 IoT Core has much more to offer than something like an Arduino-based board. On the Raspberry Pi for example, a developer can get visual feedback of system information or application GUIs by connecting a display using the HDMI port.

Azure is a cloud computing platform from Microsoft. While Azure has a plethora of services and features that developers can make use of, we focused on its IoT Hub feature, which, like Windows 10 IoT Core, is a recent step by Microsoft into the world of IoT, made available to the public in February of 2016.

What We Did

The first step in working with Windows 10 IoT Core is to set up a Windows machine, whether physical or virtual. Because we use Macs for development, we used a Windows 10 virtual machine running in a VirtualBox environment for most of our work on this project. On our virtual machine, we installed Visual Studio Community 2015, IoT Dashboard, and Device Explorer (all from Microsoft, for Windows only). Uploading an application to a Windows 10 IoT device can only be done from Visual Studio; the IoT Dashboard application makes management of the device, such as selecting the default app to be run at startup, easy; and the Device Explorer application facilitates working with Azure, through features such as monitoring data sent and received by the Azure IoT Hub.

Our next step was to set up the sensor hardware. We used the same BME280 climate sensor that we used in our previous IoT project. Installation of Windows 10 IoT Core on the Raspberry Pi is straightforward, involving simply downloading an install image from Microsoft and installing it on an SD Card using NOOBS or the IoT Dashboard application. With the Raspberry Pi, one has the choice of connecting directly to a router by ethernet or connecting the device to a monitor and keyboard, and then manually establishing a connection to a WiFi network. This is a great convenience, as it allows the developer multiple ways to easily connect and switch networks.

After setting up our Windows machines, we provisioned an IoT Hub on Azure. For this project, we used our Azure IoT Hub to receive data sent from the Raspberry Pi and later retrieve that data via the Azure IoT Hub AMQP interface. The free tier for the IoT Hub permits a maximum of 8000 messages per day, which is more than enough for our project, and as a message queue, data will be stored and accessible from the server for around 24 hours after being queued. This is an important difference from Particle.io’s webhooks, which result in data being lost if it is not accepted more than a set number of times. Once we had our IoT Hub configured, we used the Python QPID AMQP library to retrieve data from the message queue and insert it into our Postgres database.

Having finished setting up our hardware and software, we were able to write the code for the Raspberry Pi to collect climate data from the BME280 sensor and then send that data to Azure. To do this we used Visual Studio and C#, which made Windows 10 IoT Core an interesting change from working with Particle development tools. Since Windows 10 IoT Core is a Windows platform, one has access to a much deeper level of control over the project, e.g. displaying device CPU and memory usage in real time, as well as a more robust pool of resources. Windows 10 IoT Core also has access to the considerable capabilities of its supported devices and offers a vast range of possibilities such as the option of creating a visual component to a project, such as a GUI, through the Raspberry Pi’s HDMI port, and even speech synthesis and output through the Raspberry Pi’s 3.5mm audio port. Windows 10 IoT Core in particular adds further functionality through features such as remote display, in which a companion device, like a smartphone, can be a part of the project, and used as a display.

Challenges

While Windows 10 IoT Core, the Raspberry Pi, and Azure make it possible to create much more complex applications than the Particle platform, this comes with several downsides. On the hardware side, the wealth of hardware features on the Raspberry Pi comes at the cost of a much larger form factor, higher power consumption, and much higher heat output. For our test projects this wasn’t a problem, but if an IoT application is size-, power- or temperature-sensitive, this would certainly be something to keep in mind when choosing a platform.

On the software side, the increased complexity of working within the Windows and Azure platforms can lead to more problems as well as more opportunities. Most obvious is the obligation to develop in a Windows environment. This might not be an issue for users who already develop with Windows, but for users who primarily work with OSX, as we do, it takes some time to become familiar with. Additionally, if one is unable to use a physical Windows 10 machine and must instead use a virtual machine, this then adds another potential source of challenges.

There are other, less obvious, issues that come with using Windows 10 IoT Core. One example of this was an issue with Visual Studio where the software that uploaded to the device would stop updating to match the editor version of the code, and would require a restart of the program to resume updates. Other examples include a lack of documentation for Windows 10 IoT Core development and errors within several resources online, making the resources potentially difficult to use. A specific example of this was the problems we ran into using the Python AMQP library with the IoT Hub where we found a number of outdated articles that were written within the last 8 months before finally working out our own solution. With Particle, user discussion online was also a primary source of information because Particle documentation was not as detailed as it could have been, but with Windows 10 IoT Core, there is even less documentation from Microsoft pertaining specifically to developing for their platform.

Lastly, Microsoft’s IoT platform itself also has some limitations even after development has completed. Because the Windows IoT device must be on the same network as the development machine, it is not possible to flash updates or code changes remotely. Similarly, while it is technically possible to write a custom powershell script to enable deploying code to multiple devices, it is not simple, and the system performance monitoring that is available through Visual Studio is not available once the device is deployed and running without a connection to a Windows machine on its local network.

Microsoft’s platform is considerably powerful, but is situated at an odd point on the spectrum of platform complexity. The Particle platform is in a sweet spot where it is simple enough to be easily tinkered with by hobbyists, but scalable enough to do larger deployments. In contrast, the Microsoft platform is more complicated than will likely be necessary for most organizations and seemingly lacking in certain features that would make it optimal for large scale applications.

Next Steps

Having tried out the Particle and Microsoft IoT platforms, we will set our sights next on Amazon’s AWS IoT platform. As another tech giant, Amazon’s step into the IoT ring has generated a lot of buzz, and we’ll see how their platform stacks up. As a more long-term objective, we’ll also be revisiting Particle in time and look into adding functionality to our system.

Have a vision for an IoT product you want built? Drop us a line at info@missiondata.com.

--

--