Windows 10 IoT on the Raspberry Pi 2
Is IoT the NBT? If you said “Yes!”, then Microsoft might have something in a version of Windows 10 that runs on the Raspberry Pi 2. If your answer was “Huh?”, well that’s ok. We’ll learn together.
“IoT” means the Internet of things. No matter what that is, it is coming and you should learn about it, even though I’m not sure it will be the NBT (next big thing) anytime soon. From the Wikipedia article:
The Internet of Things (IoT), also called Internet of Everything, is the network of physical objects or “things” embedded with electronics, software, sensors, and connectivity to enable objects to exchange data with the production, operator and/or other connected devices… [abbreviated]. The Internet of Things allows objects to be sensed and controlled remotely across existing network infrastructure, creating opportunities for more direct integration between the physical world and computer-based systems, and resulting in improved efficiency, accuracy and economic benefit.
So, for example, your refrigerator could decide on its own to make ice only at night after consulting your smart electric meter do determine when the rates are lowest, or make ice only during the day when your solar panels are producing “free” energy. It would do this without your programming it or even telling it about the electric meter or the solar panels.
OK, that’s the tip of IoT. Now on to the Raspberry Pi which has nothing to do with dessert. From the Raspberry Pi Foundation:
The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to program in languages like Scratch and Python. It’s capable of doing everything you’d expect a desktop computer to do, from browsing the internet and playing high-definition video, to making spreadsheets, word-processing, and playing games.
What’s more, the Raspberry Pi has the ability to interact with the outside world, and has been used in a wide array of digital maker projects, from music machines and parent detectors to weather stations and tweeting birdhouses with infra-red cameras. We want to see the Raspberry Pi being used by kids all over the world to learn to program and understand how computers work.
The Raspberry Pi Foundation is an educational charity based in the UK. The original aim of the Pi project was to provide an extremely low-cost computer to school children that they could take home and program as they wished. In this country the current model Pi costs less than $40 for the bare computer. You add a case, USB keyboard and mouse, an SD card, and a HDMI-compatible monitor or a nice long HDMI cable to connect to your HD television. The idea was that in quantity the Pi is so cheap that whatever they call a school board in the UK could simply give each student a Pi of his/her very own with which to learn about computers and programming.
Now we can tie this together with what Microsoft calls the Windows 10 IoT Core – sometimes omitting the IoT and other times the Core (Microsoft branding is not getting any better). I will henceforth refer to the OS as Win10Core. As with the Server Core products, “Core” means there is no user interface to speak of. Microsoft treats the Raspberry Pi as a device for deployment only. Application development is done on a PC using existing Microsoft programming tools or some open source equivalents. The finished application is transferred to the device over the network. The whole idea behind this is that the device, in our case a RPi2, will be embedded in some larger thing that interfaces with the “real world” like your refrigerator. The RPi2 would use sensors to measure the temperature in the fridge and the freezer and operate the compressor motor to maintain temperature. Its IoT added value comes from its connection to other IoT devices like your solar array and electric meter. In this case the user interface needs only a temperature setting and a temperature reading and a means to change the setting.
The Raspberry Pi 2 (RPi2) has a micro-SD card slot on which you must install whatever operating system and any applications you wish to use. A version of Linux called Raspian is the OS most people use. Since the Win10Core has no user interface, if you want to make this a useful device, your application must start at boot and provide the entire user interface including any menus. The UI can be displayed using the video outputs provided by the RPi2 (HDMI or composite) or on the web using a web server built into Win10Core. Many of the how-to videos will tell you that Win10Core can only be installed on Win10, but Win8 worked for me. The installer download is an ISO file, ‘IOT Core RPi.IOS’, on the Microsoft section of GitHub, but start here on dev.windows.com to be sure you get the latest version and then go to “Downloads”. Once you have the ISO, right click on it and mount it. You will see a new “DVD Drive” that contains ‘Windows_10_IoT_Core_RPi2.msi’. Run this msi installer. The result will be two programs installed on your PC: WindowsIoTCoreWatcher and WindowsIoTImageHelper. Put a micro-SD card in your card reader and run the ‘Helper’. This will install Win10Core on the micro-SD card and make it bootable in the RPi2.
In addition to the RPi2, Win10Core is available for another device called “MinnowBoard Max” which runs an Intel Atom processor. All versions of the Raspberry Pi use a version of the ARM processor. The RPi2 uses a 900MHz quad-core ARM Cortex-A7 CPU, making it “six times faster” than earlier Pi’s. Win10Core runs only on the RPi2.
At the August meeting of the Single Board Computer Workshop, we reviewed Win10Core running on the RPi2 and decided it was a little lame. The user interface that comes on Win10Core shows the specs of the device and network information from the Ethernet connection. There is also a menu option to open the web-based user interface. The video interface is so slow as to be unusable. The web interface is much more responsive and shows much the same information plus links to promotional information from Microsoft. Why would anyone use Win10Core on the RPi2? We asked that very question at the meeting. The only answer is so you can use the programming tools you already know. A windows developer using Visual Studio and the .Net Framework on Windows for regular or web-based applications would be right at home programming for Win10Core. However, several other operating systems have been ported to the Raspberry Pi along with associated programming tools. Python is the language promoted by the Raspberry Pi Foundation, but just about every other language you can name has also been ported to the Pi. Raspian is a very nice version of Linux that comes “fully equipped” in the normal download. The consensus was that Win10Core can be safely ignored for now.
The Single Board Computer Workshop meets on the third Thursday each month at 7 pm in the DACS Resource Center.