Arduino Development with Visual Studio via Visual Micro (Overview)

Visual Studio has become a one stop shop for any type of development.  But did you know you can do Arduino development as well?    There is a Visual Studio extension called Visual Micro (http://www.visualmicro.com) which will allow Arduino development and debugging within Visual Studio IDE, with the full development experience you have become used to.   This is a high level overview of what is provided.

 

Arduino and Visual Studio

 

What’s really great about having Arduino support within Visual Studio is, you can group together all the various different projects that makes up your solution all together within a Visual Studio Solution.

 

Multi-platform Solution

 

In a world of Iot and cross platform (or multi platform) development this is perfect.   You could have one or more Arduino projects, .NET Micro framework projects,  a Xamarin Mobile client and the back-end (be it an on-premise ASP .NET WEB API solution, or in the cloud with something like Azure Mobile Services) all managed together in a single Visual Studio solution.

 

Installing Visual Micro

 

Visual Micro can be downloaded here:   http://www.visualmicro.com/page/Arduino-Visual-Studio-Downloads.aspx   It is a Visual Studio extension which will be installed within Visual Studio.   There is a version for both Visual Studio 2015 and 2017 RC.     Be sure to have the standard Arduino IDE installed as well, as it uses this tooling under the hood.   Arduino version 1.06 – 1.8 is supported.

 

The IDE Experience

 

Visual Micro Toolbar

 

 

Visual Micro Menu

 

Both a toolbar and a new menu is added to Visual Studio.    The toolbar allows access to quickly configure the connected board and COM port used (via USB).    It also allows quick access for building and debugging, however if the Arduino project is the startup project the debugging and build options work as usual direct from the Visual Studio hotkeys, toolbars and menu items.    The menu allows for deeper configuration of the compiler, debugging options and other integration options.

 

File New Dialog

Templates are provided to easily create a new Arduino Sketch or Library.    Standard Arduino INO files are supported.   These standard file types are also used when opening and saving to existing Arduino Sketch files, which ofcourse can be ported back to the Arduino IDE if need be.

 

Solution Explorer

 

The solution explorer is quite neat for the Arduino.   All the source files, header files and external dependencies are presented in much the way you have grown accustomed to in Visual Studio.

 

 

The Visual Micro Explorer provides a visualization of all libraries installed.    There is also reference material and documentation provided along with a collection of Example code.   This is great for both learning and quickly looking up something.

 

The debug experience

 

Debugging Experience

 

Debugging and conditional breakpoints are supported.   This does though require a purchase of the Pro version.   The pro version has quite a number of additional features aswell which you can read about here:  http://www.visualmicro.com/page/What-features-are-included-in-Visual-Micro-Pro.aspx

 

The live tracing works great.  There is also the standard port monitor which does live logging of the Com ports.    In the screenshot provided the codes displayed are being reported from an infrared remote control in real-time.   The ability to see everything happen, and be visible, at once in an IDE saves a whole load of time.

 

Conclusion

I’ve been using Visual Micro for a few Arduino related Iot projects and can definitely recommend using it.

 

Happy Arduino coding!  🙂

FacebookTwitterGoogle+LinkedIn

Build 2015: Windows 10 IoT Preview on a Raspberry Pi 2

Day 1 of Build 2015 has been great!   The IoT inclusions especially have been very exciting for me.

 

We now have Windows 10 IoT core released and running on:

Raspberry Pi 2
MinnowBoard Max
Galileo

 

Also very interesting and exciting news is, we have Arduino support from Microsoft.

Windows Remote Arduino
Windows Virtual Shields for Arduino

 

Let’s start by installing Windows 10 IoT Core Preview on a Raspberry PI 2. I know many of you that bought a PI just to do this, I know I did. 🙂

 

Start by downloading the “Windows_IoT_Core_RPI2_BUILD” from https://connect.microsoft.com/windowsembeddedIoT/Downloads.  I had to accept some EULAs and click around before anything appeared to be selected for download.  It could have also been a timing problem as I was a bit eager to download and perhaps it was not available that soon.

 

The requirement for the installation is a Windows 10 Build 10069 or higher PC to copy the Windows 10 IoT installation onto an SD card . I downloaded the new Windows 10 Build 10074 ISO that was released today from http://windows.microsoft.com/en-us/windows/preview-iso-update-1504.

 

Install Windows 10. I ignored the recommendations and installed on a Virtual Machine (on VMWare) and not a physical PC.  VMWare  passes through the SD card without problems to Windows 10.

 

Once everything is installed, copy the “Flash.ffu” file from the downloaded “Windows_IoT_Core_RPI2_BUILD” zip file to a folder on the Windows 10 PC.

 

From an Administrator Command line run the following command:

 

diskpart
list disk
exit

 

Note the number of the disk associated with the SDCard.

 

Run the dism command replacing the N in “\PhysicalDriveN” to the number noted above.

 

dism.exe /Apply-Image /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDriveN /SkipPlatformCheck

After a short wait, you should see: “Operation completed successfully”. Eject the SD card.

 

success

Insert the SD card into the SD card slot in the Raspberry PI 2. Plug the HDMI cable into the PI and of course the monitor. Plug the power cable into the Raspberry PI. After a few worrying minutes Windows 10 IoT should be all booted up. It will reboot once during the initial setup process and the interesting blocks displayed in-between the Windows Logo appearing and final boot-up seems normal.

 

Next step is to make it do something useful! 🙂

 

rasp pi 2 rasp pi 1

For full detail instructions you can follow this link: http://ms-iot.github.io/content/win10/SetupRPI.htm

FacebookTwitterGoogle+LinkedIn