Last night was the Cross Platform Iot Session at CTXUG in Cape Town. The turnout was absolutely amazing! Thank you to all for coming it was a really fun evening!
Roger Weiss from Aliens kicked off with an overview of Windows 10 Iot Core and a few demos. These demos featured some awesome use of Microsoft Cognitive services and also some nifty voice controlled home automation.
It was then my turn. Unfortunately Chris van Wyk couldn’t make it this evening. 🙁
The session featured
Visual Micro for Visual Studio
Visual Studio Code with Arduino Extension which is now Open Source.
Xamarin Forms and Xamarin.Android with Android Things 0.41 Preview
The new Xamarin Iot preview for Linux based devices
A great test of the contrib drivers is Pimoroni’s Rainbow Hat. https://shop.pimoroni.com/products/rainbow-hat-for-android-things The Rainbow HAT brings together a lot of the components mentioned above on one board. It’s provided with the Android Things Starter Kit so it’s a very good place to start. The first sample I’ve added here focus’s on this specific HAT.
The sample added is based on the google Weather Station sample. It has one difference, it uses Azure Iot Hubs for cloud messaging.
Push Button (A) to swap display from Temperature and Pressure on the board display
Native UI for RaspberryPi to display weather based on air pressure
Telemetry sent from Android Things Device to Azure via Azure Iot Hubs
Message support from Azure to Android Things Device.
To uses the Iot hub in the sample, the DeviceId, DeviceKey and HostName of an Azure Iot hub will need to be provided. I will do a post specific on Iot Hubs to provide more detail on this in subsequent blog posts. These variables are set in the MainActivity.
private bool _useHubs = true; // Set this to true to use Azure Iot Hubs
_weatherDevice.DeviceId = "<Add Azure Iot Hub Device Id Here>";
_weatherDevice.DeviceKey = "<Add Azure Iot Hub Device Key Here>";
_weatherDevice.HostName = "<Add Azure Iot Hub Hostname Here>";
I’m in the process of creating more samples of the rest of the contrib library. I’m also packaging more third-party drivers from around the community into reusable Nuget packages for Android Things with Xamarin.
I’m also having a lot of fun at the moment with a version of these drivers, built from scratch to work with Xamarin Iot. We can then have these components (and Rainbow HAT) working on Linux devices which will of course be awesome!
With Microsoft Build 2016 complete, there are so many things to be looking at and trying out. One of the more useful features for me right now is the new remoting functionality in Windows 10 IoT Insider Preview 10.0.14295. I have this running on a Raspberry Pi 3 and I am busy with some work using an array of sensor telemetry. Being able to see what is happening remotely make life far easier when building Universal Apps.
To configure this is very simple. There is a new menu option added to the administration console called “Remote”. This is accessible via the URL: http://[ipaddress of pi]:8080. If you haven’t changed the password the login should be: “Administrator” and “[email protected]”
Enable the Windows IoT Remote Server by ticking the box presented.
This will run on any Windows 10 device. Just something to note: on a Windows 10 Mobile device (Lumia 950 XL in my case) you may have to set the device color scheme to light for the application text to be legible. I’m sure this will be corrected in later builds.
Fill in the IP address of the Raspberry PI in the “Enter an IP address” text box and click / tap “Connect”. You should now be seeing what the Raspberry Pi is displaying.