Twitter Client for IOT

You should have heard by now that Microsoft has really taken a huge step into Microcontroller programming with their Universal Windows Platform (UWP). This allows developers target multiple deployment platforms such as Windows Desktop, IoT devices (like Raspberry Pi 2), phones, tablets, etc. However you can program using common .NET tools such as Visual Studio, common Microsoft programming libraries such as Windows Presentation Foundation (WPF), and packages from the NuGet repository. This enable a vast array of software developers to immediately build applications for desktop and mobile devices without learning new technology stacks.

This example will show how easy all this is. We’ll build a Twitter Client for IOT on the Windows 10 Core platform. Deployment will ultimately be for a Raspberry Pi 2. However, all development will be done on a desktop using common windows tools and libraries. Here is the list of tools we’ll be using:

  • Visual Studio 2015
  • Windows Presentation Foundation (WPF)
  • MVVM Light Toolkit
  • Unity (for dependency injection)
  • LinkToTwitter
It’s truly amazing all the common libraries and development paradigms can now be immediately deployed to Desktop, Phone, and ARM-based hardware.
First, you’ll need to setup your computer for development for Universal apps by following the Windows IoT Get Started guide.
Second, download the source code from my GitHub TwitterClientUWP project.
I’m using the following NuGet packages:
  1. MVVM Light Toolkit
  2. Unity
  3. LinkToTwitter
  4. CommonServiceLocator

These are all standard NuGet resources which will deploy seamlessly to ARM platforms.

Running the application results in the following screen:

TwitterClient

It’s not super pretty, but you can see the tweets and any images uploaded.

You can deploy this to your Raspberry Pi 2. You must remember to change the deployment settings to ARM.

Deployment

You can even debug and step-through the code as it’s running on the Pi 2 hardware. This is really amazing.

For those of you who follow me, I have been programming NETMF on the GHI hardware for more than a year now. The GHI hardware is excellent. The GHI/NETMF platform is excellent for low-level programming. Windows IoT feels more like programming for desktops. The choice of which platform to pick really boils down to you particular need. I feel most hobbyist will pick the Pi. If you’re looking to do a serious hardware prototype, you should really consider GHI/NETMF.