First Look at Xamarin IOT

This is a first look at the new Xamarin Iot functionality found within Visual Studio for Mac 7.1 Preview.   I will dig much further into detail in future posts, but lets have a very quick look and it.    I’m really excited about this addition to the already awesome Xamarin tooling!

 

New Iot Project Type

 

A new project type has been added for Iot.    This project type or template will create the solution and project needed to run on the Iot device.

 

Manage devices option

 

What’s immediately apparent is the new run option for the Iot project type.   There’s now a new item called “Manage Devices”

 

Iot device manager

 

The Iot Device Manager allows all the connected devices to be managed.   This setup is very similar to the Mac Agent used for iOS development with the Xamarin Visual Studio for Windows extension, however it will display all the Linux based devices running on the network.  In this case and screenshot it’s a Raspberry Pi Zero running Raspian (Jesse).   Configuring the device will allow remote deploys to the device from your Mac.    This will require a user name and password of a user on the Raspberry Pi.  This user will be used to connect to the Raspberry pi via SSH.    Also note, SSH needs to be enabled on the Raspberry Pi for this to work.

 

Executing remotely on device

 

Now you can start developing your Iot solution.   What’s really awesome is, all the things you expect to work will just work. This includes break points and a full debugging experience.     All this can happen wirelessly to a “headless” device.

 

The build and execution process is very similar to the Mac Agent when you do iOS development from Windows (Visual Studio) to a Mac.  The difference in this case, it is from a Mac (Visual Studio) to a Linux instance (Raspberry Pi).   On the very first execution, the mono run time will be copied over to the device.  This will be used to execute the built app.    The application itself and it’s “built code” is also synchronized with the Raspberry Pi.    This compiled Iot app is then in turn executed on the device remotely.

 

Lets see it in action!    Here is a simple example of the now standard Iot demo of a flashing LED, but running on a tiny Raspberry Pi Zero W.    What’s really nice about this implementation is, it runs on devices that is not supported by other Iot platforms, like Android Things and Windows 10 Iot Core.   It will run on the myriad of Linux based devices out there.

 

 

There is much more to show and tell.  So there’s much more blogs to come on this topic!   This will also include how Android Things and Xamarin Iot can work together to make cross platform Iot simpler.

 

But for now:  Happy Xamarin Iot’ing! 🙂

 

apead

I am a Xamarin Most Valueable Professional (MVP), Microsoft Developer Technologies MVP, Microsoft Internet of Things MVP, Microsoft Azure MVP, Architect, Software Developer, Organizer and Sponsor of the CPTMSDUG, JHBMSDUG and DBNMSDUG User Groups and father of 2.