Visual Micro for Arduino 1.6.3

by Visual Micro 19. April 2015 23:33

The latest Arduino Ide for Visual Studio (v1504.20) contains support for Arduino 1.6.2+. This includes integration to the new Arduino Boards and Library Management System which provides access to various hardware cores and third party libraries.

Boards Manager read more

Library Manager read more

Global library keyword filtering with statistics

Useful information panel with links and status reporting

Visual Micro's implementation of the Arduino Boards and Library Management System is delivered through a new updated "Visual Micro Explorer" tool. The tool is, as with previous releases, accessed using the yellow question mark to the right of the boards tool bar list or the "Tools>Visual Micro" menu.

The existing elements of the Visual Micro Explorer provides a number of other new features such as one click switch board or import library to the currently open sketch. 

Search for boards by name, register new IDE locations, view the documentation and other useful features such as more informative tool tips.

The Micro Explorer also now includes information and short-cuts to important Arduino configuration and source folders via windows explorer. This is useful for advanced users but also for new users to confirm the correct locations.

Aside form the hardware and library download and version management system, it is also now possible to install both libraries and boards directly from Zip files. Links are provides in the Visual Micro Explorer to these features and also from the standard "Project>Add/Import Sketch" Library menu available when editing an open sketch.

Installation for new users is easier. The prompt to start a debugger trial has been removed, instead a trial is automatically started. Invalid IDE location config data is more easily identified in both the tool bar and the Visual Micro Explorer.



How to create collapsible regions in Arduino code

by Visual Micro 8. April 2015 15:02
#pragma region lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio Code Editor
#pragma region name
#pragma endregion comment



A comment that will display in the code editor.


The name of the region. This name will display in the code editor.


#pragma endregion marks the end of a #pragma region block.

#region block must be terminated with #pragma endregion.


// pragma_directives_region.cpp
#pragma region Region_1
void Test() {}
void Test2() {}
void Test3() {}
#pragma endregion Region_1

int main() {}

Arduino - Boards Manager - FAQ

by Visual Micro 8. April 2015 08:38

How is the boards list generated?

Arduino maintains the list and updates it every time a new core or tool or board definition is updated.

You can also add your own urls for additional (non-arduino) hardware in the Visual Micro "Configure Ide Locations" Window

Can I add my own url with my own boards list?

At the moment, the IDE handles one URL only, and that's written into the code. This is a known limitation. However, if you know your way through the code, you can change that URL with another one.

I can't delete one of the cores!

Built-in cores cannot be deleted: they are part of the minimum setup provided by the IDE. However, if the built-in version is giving you troubles and a newer (or an older) one would solve your issue, you can upgrade (or even downgrade) a core, choosing one of the available versions

Where are installed cores located?

  • On Windows: %APPDATA%\Arduino15\packages\

Arduino - Library Manager FAQ

by Visual Micro 8. April 2015 08:35
How is the library list generated?

From a list of public git repos, a job (a small program that runs regularly) fetches every tag, verifies library files and push the updated list onto the Arduino download server. Only valid libraries and their tags are published. A library is not valid when:

The job runs every hour. If a new library has been released, you can expect it to be listed within the hour.

How can I add my library to Library Manager?

  • Ensure your library is complaint with 1.5 format
  • Tag it and push the tag, or create a release with github "releases"
  • Open an issue on Arduino's github, specifying the git repo (or github url) from where to download your library

How can I publish a new release once my library is in the list?

Just tag your library once more and push the new tag, or create a new release with github "releases". Our job will eventually fetch and publish your new release.

How can I delete a library?

Open your sketchbook "libraries" folder with your OS file explorer (win: explorer, mac: finder, linux: nautilus, kfiles...) and delete the folder containing your library.


No, we don't have a delete button. Libraries managed by the Library Manager are mixed with those you've manually installed, maybe libraries you've written: making a mistake and deleting the wrong library is too easy. That's why trash bins exist. Since the IDE has no knowledge of your trash bin, we didn't implement a "delete" button.


Can I add my own url with my own library list?

At the moment, the IDE handles one URL only, and that's written into the code (dev jargon: it's hardcoded). This is a known limitation. However, if you know your way through the code, you can change that URL with another one.

When I install a library that I know depends on another library, will this other library be installed as well?

No, at the moment library dependencies are ignored. Current Library Manager aims at simplifying your life when dealing with installing a single library. If a library depends on another one, you'll have to install both.

Can I install multiple versions of one library and use the proper one in my sketches?

Library Manager installs libraries into your sketchbook "libraries" folder. Since you cannot create two folders with the same name, we can't install two versions of the same library. However, you can switch between library versions, by selecting the appropriate one from the version dropdown that pops up on Library Manager when more than one version is available.



Announcing the Wiring Ide for Visual Studio

by Visual Micro 7. March 2015 11:17

The Wiring Ide has been added to the standard list of supported Visual Studio Ide's.

The Wiring Ide gives an interesting alternative to building programs with the Arduino core/backend.

Hardware manufacturers, such as sparkfun electronics, make simple update packs for Wiring that extend the list of available boards that can be developed using the Ide.

Read more

Image of the Wiring Ide hardware being programmed in Microsoft Visual Studio


Arduino Defines - Configuration/Project Now Supports {}

by Visual Micro 21. September 2014 09:39
These project properties can now include merge field expressions that make use of any of the build properties.

This example makes the upload COM port available to the code as a #define called myport

myport {serial.port}

tip: All build properties can be viewed during compilation by switch on "tools>options>visual micro>compiler>show build properties"


Arduino Jobs - Marketing, Relationship Manager and Blogger

by Visual Micro 9. September 2014 06:00

Visual Micro is a small but growing organization currently packing a large punch within the embedded and IoT open source sector. Our solutions are especially focused on Arduino. 

The Visual Micro plugin for Arduino is currently used by many thousands within universities, colleges and commercial organizations along with many hobbyist users.

ROLE: Internet Marketing, Partnership, Relationship Manager and Blogger

Based: Anywhere, fluent English, good grammar skills.

You will know the Arduino hardware very well and have many creative ideas about how our plugin and Arduino can be used to deliver exciting projects.

This role requires you to identify and approach partners of all types with simple but creative unique messages of interest.

You will have wide ranging knowledge and understanding of embedded technology specifically aimed at the Open Source education, commercial and hobby sectors.

This is a big role that will form an important part of developing the visibility of Visual Micro on the world wide stage.

Please use the "Contact Us" page to gain further information and to arrange a discussion with myself, Tim Leek founder of Visual Micro.



How to add Arduino source code #region blocks

by Visual Micro 27. July 2014 06:08
#pragma region RegionName
void setup()

  /* add setup code here */


void loop()

  /* add main program code here */

#pragma endregion 

tested with vs2010

Exploring Your Arduino Code Using Intellisense

by Visual Micro 12. May 2014 10:53

Exploring Your Code

Both Visual Studio and Atmel Studio have powerful built in tools  that help you when navigating through your code. It is absolutely worth learning to use these functions.

You can...

  • find the places where you declared functions and variables
  • find the places where they were used
  • what functions call other functions
  • and much more

In this aspect, Visual Studio and Atmel Studio differ substantially, because they use different software tools for that purpose.

Atmel Studio

Atmel Studio uses an add-in product, Visual Assist from Whole Tomato Software. This add-is part of the Atmel Studio installation.

Atmel Studio Class Member Dropdown

An automatic class member dropdown in Atmel Studio

You can find Visual Assist's documentation here.

Microsoft Visual Studio

Microsoft Visual Studio has similar functions already built in.

Visual Studio Intellisense Dropdown

An automatic ("Intellisense") class member dropdown in Microsoft Visual Studio

You can find the documentation for Visual Studio here.

Go To Definition

Another useful feature is to right click code and select "GoTo Definition". Doing so will jump directly to the definition of the selected code (where applicable)

Use the tool bar or short cuts to return to the previous code point or use the bookmark system to easily jump between favourite places within your source code


User Guide

Arduino Serial COM ports missing or incorrect

by Visual Micro 11. March 2014 12:20

If you encounter a persistent problem where a COM port shows as the wrong number or Serial ports are missing entirely then this is most likely due to a corrupted windows wmi database.

By default Visual Micro looks for the "pretty" names of COM ports such as "COM11 - Arduino Uno". The pretty names are found in the windows wmi database.

If you would prefer not to find a solution to this problem then it is possible to force Visual Micro to work the "old" way, without using the wmi database.

In this case windows should provide Visual Micro with an accurate list of Serial ports.

To switch off wmi database usage ensure that the following three "Tools>Options>Visual Micro>Comunnications" options are set to 'False'

  • Friendly Port Menus
  • Friendly Ports Lists
  • Network Discovery

In the current release (14x.x) the side effect of disabling these options is that, wifi (yun) upload and publishing of files to an Arduino web server will not be available.

note: Visual Micro does not alter or install any com port or usb drivers

Display Debugger 'When Hit' Arduino Messages

by Visual Micro 25. February 2014 14:45

Use the yellow bug button on the serial window during an Arduino debug session to alter various properties, such as which Visualizations open and which output windows and/or serial window will receive "When Hit" text messages.


How to override the Arduino build or upload events

by Visual Micro 5. February 2014 14:08

Visual Micro uses the flexible build configuration system process of the Arduino Ide and also supports the extensions of Teensy and some other hardware manufacturers.

Teensy Example #1 - Extend the upload process

The boards.txt that is installed under the teensyIde/hardware/ avr or teensy folders contains a list of boards. You can copy these entries enaming the first part of each board property. For example becomes

Each board entry defines the uploader exe name. The uploader exe is passed a few paramaters such as com port mcu etc. as normal program args[]

So it is easy to set the upload to use a different uploader program which might first call the "real upload" and then can then run any windows program as required or show it's own form/user controls. 

Teensy Example #2 - Replace the standard process

Instead of adding a custom boards.txt entry the existing compile or upload command supplied with the Arduino Ide can be renamed and a small windows program can be used in its place. The windows program can call the renamed original first, causing compile or upload to occurr prior to performing other tasks or launching another program.

Manual Controls

It is also possible to add your own short cuts and menu items to Visual Studio that run macros or programs. You can also register external tools.

Debugger Extensions

The Visual Micro debugger is the first component in Visual Micro that supports open source extensions. You can read more about adding your own C# or VB graphical extensions in the wiki

Control where debugger text messages are displayed

by Visual Micro 20. January 2014 15:02

applies to visual micro 1401.20 +

The BUG button on the serial window is enabled when the debugger is running and contains a menu item called "Message Windows". The options of the menu allow you to control which windows debugger text messages are displayed in.

The current default combines text messages and trace messages together and will will note that "Message Windows>Trace" is ticked

If you un-tick "Trace" and tick "Message" then this will work like the previous release and show separate trace and messages. If you tick both then both the trace and message output windows will show text messages.

I can't make my mind up what the best default should be, the current defaults ensure that everything is visible while the debugger runs. Interested to hear opinions thanks.

One thing to be careful of, if there are huge volumes of debugger messages per second, showing messages in both the trace and the message window will affect pc cpu usage. On fast pc's it might not be an issue but on slower pc's it can cause the pc debugger display to fall behind real-time due to inability to process messages fast enough.


Avr Programmers (and others) Usb Driver for Arduino

by Visual Micro 17. January 2014 09:21

This document solves usb driver errors for Arduino programmers. The problem usually happens after installing Atmel Studio. The error will often be:- avrdude: usbdev_open()

Atmel changed the usb driver they install to Jungo which doesn't work with the Arduino Ide and therfore with Visual Micro

This document explains how to switch the driver to one that the Arduino tool chain will work with.

Tested on Xp, Win7 and Win8.1

1) We downloaded the latest release ( of libusb-win32 from but the latest release can be found here

2) Unpack the libusb zip and run the inf-wizard.exe in the bin folder AS ADMINISTRATOR

3) Select the avrisp mkII from the list that appears when you run inf-wizard then click next through the wizard.

4) When prompted select a place on your pc to save the .inf file that the wizard will create. (If you loose the file in the future you can simply repeat the task)

5) When prompted click OK to install the driver.

If required you can run the Atmel Studio 6.1 Jungo driver install again and revert to Atmel Studio drivers with the avrispmkII. 

It is probably also possible to switch back to arduino/avrdude mode by reapplying the .inf created in step 6) via device manager

Sorry about the formatting of the following, it is my fault and caused by conversion from ms word. This update was submiited by Brian M. It explains how to make both the Arduino and Atmel Studio Native commands to work using the same usb driver

Using Atmel's AVRISP mk II Programmer

 with the Visual Micro plug-in for Atmel Studio IDE 

Overview:  When you install the Arduino IDE, a USB driver is installed so that you can use the Atmel AVRISP mk II programmer as an alternative to using the Arduino serial Boot-loader. Also, if you need to actually program an AVR MCU with the bootloader code itself (i.e. if you have a blank Mega328 that has not had the boot-loader firmware pre-installed), you can do so from the Arduino IDE using the Tools/Burn Bootloader function- after having specified the AVRISP mk II as the programmer using Tools/Programmer function.

            When you install Studio 6.1/ 6.2 however, the Atmel installation will install it's own USB driver, which work with the Studio6.x IDE. This is the Jungo driver, and while you have the option of not installing the Jungo driver during the Studio install process, you can't use the Atmel AVRISP mk II nor the Atmel JTAGICE3 without this driver.


The Problem: When you install the Visual Micro plug-in for Studio 6.x, you are most likely to be using the Arduino serial bootloader, since Visual Micro's programming and  debugging capability is based upon the USB-serial link between the PC and the Arduino board. Doing things  this way works fine.

            However, if you decide that you want to use the Atmel AVRISP mk II from within the Visual Micro/Studio 6.x IDE (for downloading your program, or burning the Arduino bootloader), you will find that it doesn't work. You will get an error message to the effect that AVRdude (the programming software used by the Arduino IDE), can't “see” the AVRISP mk II programmer. This happens because Studio6.x uses the Jungo USB driver, and Visual

Micro basically calls the AVRdude programming software (located in the Arduino program folder) just like the Arduino IDE does. AVRdude won't work properly, because its normal USB driver has been replaced by the Jungo driver that Studio6.x has loaded.


The Solution:  What we need is a way to allow the Jungo driver that is associated with the Studio6.x to co-exist with the USB driver that the Arduino IDE uses. That is, we want the Arduino programming routines (i.e. the AVRdude program) to work even with the Atmel Studio6x Jungo driver loaded. This is not too difficult to achieve.

1)   If you want to be certain that Studio6.x has installed the Jungo driver, you can run the Windows Device Manager program, and you will see the following (assuming your AVRISP mk II is plugged in)


2)    The USB driver that the Arduino IDE uses (and therefore Visual Micro) is libusb0.dll. This DLL comes from a larger driver package that installs a basically generic USB driver (which can be used by a variety of Windows applications). This package provides drivers in two formats: stand-alone and filter. The stand-alone format is what the Arduino IDE installs when you run the Arduino setup program. It works fine on its own, but doesn't work with native Atmel Studio6.x tools unless using Visual Micro. If the Atmel Studio usb drivers are installed then we can still program Arduino using Visual Micro but not the Arduino IDE. This can be fustrating if we want all software to work all of the time regardless of Visual Micro. The filter version of the driver works differently. It basically interfaces to your application (Arduino IDE in this case) via the libusb0.dll, but the filter version of the DLL then “massages” the data and forwards it along to the Jungo driver (which is what Studio 6.x uses by default).So, after installing this “filter” version, when you use the “upload using programmer” or “Burn bootloader” functions available in the Tools/Visual Micro toolbar, they will work correctly.

3)   You download the libusb package from the website, by searching for libusb. Pick the libusb-winb32 version. Unzip the downloaded file (libusb-win32-bin- when I did it), navigate to the libusb-win32-bin- folder  and enter  the i86 folder. Plug in your AVRISP mk II now. Then run the install-filter-win program, which will display the following screen:


Press Next, and you should see your Atmel AVRISP mk II in the list:

            Select the AVRISP mk II and hit Install.

            If the AVRISP mk II does NOT appear, it is possible that a libusb driver for it has already been installed (and presumably not the filter version, or you would not be having this problem in the first place).You can go back and select the “remove a device filter” option, and if you see the AVRISP mk II in that list, remove it. Then you should be able to re-try the installation of the filter driver for the AVRIPS mk II. If successful, you should get the following message:

4)   You should now have a libusb0.dll filter driver installed for the AVRISP mk II. You can check for its presence in the Windows/System32 folder under the filename libusb0.dll. You can test the driver using the testlibusb program (in the x86 folder mentioned above):


We're almost done. However, we have to stop the AVRdude program (used by Arduino for programming) from using the libusb0.dll file that it has already installed in its own folder, and use the new (filter version) one that we've just installed. Do do this, we have to “remove” all instances of the libusb0.dll file from within the  c:\program files\arduino folder hierarchy.

The best way to do this is to navigate to the  c:\program files\arduino folder, and do a search for “libusb0.dll. Once you have found them, rename them to libusb0.dll.bak (in case something goes wrong and you need them back again!


            In the case of my XP computer, there were 3 files, and on my 32-bit Win7 computer, there was an additional libusb0-x64.dll file (for 64 bit windows). Once these files are “removed” by renaming them, AVRdude will still look for libusb0.dll, but will only find the filter version in the windows\system32 folder, (where all windows programs look, by default, if they can't find the necessary DLL in their own folder).

            At this point you should be able to open the Studio6.x program and go to the Tools/visual Micro/Programmers tab and select the AVRISP mk II. After you click the “upload  using programmer” tab you should now be able to download programs to your AVR target board using the AVRISP mk II programmer, or use the “burn Bootloader” routine in the Tools/Visual Micro menu bar.

NOTE: to use the Visual Micro USB debugging routines, you will still need to connect your Arduino board to the PC using the standard USB connection cable, as fully described in the Visual Micro documentation.

            This procedure worked for me on both my XP and 32-bit Windows 7 computers, one with Studio6.1 and the other with Studio6.2 and the Visual Micro plug-in.


How to Create Arduino Projects In Visual Studio

by Visual Micro 13. January 2014 11:25

Tips - Opening and creating sketch projects

The easiest way to create a project is to use "File>New>Sketch Project". If you have a solution open already then click "File>Close Solution" before doing so otherwise a 2nd project containing the new Sketch will be added into the current solution. Newer users often find it easier to use one solution per project in the early days of using Visual Studio

To open an existing sketch use "File>Open>Sketch Project". Again close the solution first if open.

Once you become more familiar with Visual Studio you will find there are lots of other ways to open sketches. For example, with the solution closed (an empty Visual Studio Ide) click File>Open>File and navigate to any Arduino sketch then click to open a .pde/.ino. The addin will detect the Arduino sketch and ask you if you want to create a new sketch project. or if a project already exists it will ask you if you want to open it.

Advanced users can simply create a normal empty Visual Studio Win32 C++ project and add a .ino of the same name. Visual Micro will kick in and provide Arduino functionality as normal.

The only rules are the Arduino rule which state that an Arduino sketch must contain a .ino file of the same name as the folder. In Visual Studio the project must also have the same name as the folder and the .ino

So, in summary, the special "Sketch" menu items created by Visual Micro are the best for newer users of Visual Studio. These menu items are also aware of the "SketchBook" folder so position file explorers to where Arduino projects are normally saved.

Arduino Yun - Upload And Debug Yun Over Wifi

by Visual Micro 12. January 2014 17:40

ESP8266 - December 2016 - WiFi debug beta for the esp8266 has been released. Update of variables during debug session is not yet supported. Debug with the esp8266 is easier than with the Yun so please ignore this page and follow the standard visual micro serial debug guide inconjuntion with OTA/IpAddress upload. More docs to follow on the esp8266 page.

NEW USERS PLEASE NOTE: The Arduino Yun only has 4k of free memory when the Arduino networking library called Bridge is included in a sketch. If you are using the network capabilities of the Yun within your sketch then debug using network makes sense. If you are not using the network capabilities of the Yun within your sketch then debug over network is not a practical solution in which case you should use serial usb or SoftwareSerial etc. We recommend that new Arduino users should learn how to upload using serial usb before using the network features of the Yun

Download the first debugger release for Yun networking

This document is draft and will become a summary of tips to make wifi debugging with the Arduino Yun easier.

It is possible to upload and/or debug the Arduino Yun by selecting the hostname/ip address of the Yun from the ports list and clicking Debug>Start (little green arrow on the toolbar).

Tip: Visual Micro shows a combined list of Serial port and Arduino hosts in the post list. The upload port is set via the tool bar or Tools>Visual Micro menu.

Any port can be monitored in terminal by either viewing the upload port terninal using the icon/menu or by using the "tools>visual micro>other serial ports" menu item.

Network ports will only be discovered by Visual Micro if Apple Bonjour Service for Windows is installed on the computer.

Network upload is slow compared to normal serial (or programmer) upload. For this reason, where possible we recommend upload using usb, debugging can still be network which is fast (unlike upload)...

For debugging with the Yun you have the usual options of serial or softwareSerial etc. and also the option to use network/wifi

If uploading using network then the default debugger transport will automatically use the network. If upload using Serial/Usb then debugging will automatically use Serial/Usb. The defaults can be overridden in the project proeprties in the same way that SoftwareSerial can optionally be used for debugging (read on).

Network debugging uses the Arduino Console/Bridge library. For network debugging in the beta, the Arduino Bridge or Console libraries MUST have been imported into the current sketch otherwise debug compile will fail. We suggest new users start with the "Bridge" sketch found in the examples explorer (yellow ? on the toolbar)

To upload using Serial/Usb and debug using network, set the following project properties. (tip: project properties appear when selecting the project name in the solution explorer and clicking View>Properties window or when clicking the Yellow question mark icon on the tool bar)

  • LocalPort = Ip address of the Yun (see the ports list to find the address)
  • RemotePort = Console
  • RemoteTransport = Bridge


In our limited tests the debugger appears to work well over the network we will appreciate hearing feedback in the forum 

The www folder below the current sketch is automatically uploaded during a networked program upload. The www files can also be uploaded manually using the menu "Project>Publish sketch www files"


Python Tools for Visual Studio (PTVS)

by Visual Micro 10. January 2014 08:48

Visual Studio is a useful tool for programming Arduino but now we can also code in python for the Arduino Yun

This is a great article with links to the free download of ptvs

Arduino Yun Python Tools In Visual Studio (click to zoom)



YunClient And Long Strings

by Visual Micro 4. January 2014 21:03


Arduino dev have solved this. Details here

If you have this problem, until an updated package is released, here is what you need to do.

  • Using SSH or YunSerialTerminal, connect to the linux side of the yun.
  • Edit file /usr/bin/run-bridge, changing "python" with "python -u" (ie: add a "-u" to the command line)
  • Edit file /usr/bin/kill-bridge, again changing "python" with "python -u" (ie: add a "-u" to the command line)
  • Type kill-bridge and re-run your sketch



Visual Micro - Links & Reviews

by Visual Micro 1. January 2014 00:00

Read about and review Visual Micro

Visual Studio Gallery

Visual Micro's Page on


Serial Ports and Terminal Windows in Visual Studio and Atmel Studio

by Visual Micro 14. September 2013 14:46

The free Visual Micro plugin provides multiple Serial Port Terminals along with "auto-pause for upload" and optional usb "auto detect/re-connect". Serial port "Friendly Names" are optionally provided as part of the Visual Micro + upgrade.

  • Auto-reconnect will detect when the micro-controller has disconnected from the usb. The Ide will automatically reconect when the port becomes available again. This feature can be enabled/disabled in tools options
  • Auto-pause for upload detects when a usb upload to a micro-controller is about to be attempted on a port that is currently open as a terminal window. In this case the terminal will close the port and automatically re-open after the upload completes.
  • Discovery of "friendly" serial port names can be a great help compared to simply seeing COM1 and/or COM2 etc. The friendly name feature is switched on by default and can switched off in the Communications section of Visual Micro "Tools>Options"

An overkill example of many serial terminals and also of many connected devices :)