Visual Micro - Arduino programming environment

Visual Micro - Programming Arduino in Visual Studio

Visual Micro is a free extension added fullness of the possibilities of the Arduino development environment to Visual Studio from 2008 to 2013.



Fully compatible with Arduino IDE, uses the same libraries, sketches and other means. The main difference is the interface built in Visual Studio, which provides a more professional function, for example,

  • the possibility of the suspect and editing libraries
  • go to determine the program code, a compile-time error,
  • intellisense (hint syntax),
  • the memory version of Arduino for the project



To install VisualMicro will need the following programs:

(note: Visual Micro does not work with Express versions of Visual Studio)



  • Download and install the Arduino IDE. Visual Micro uses its functions, therefore, requires that the original Arduino IDE was already on the disk.
  • Download and install Visual Studio. Visual Micro uses it as an environment to program and upload sketches to an Arduino Board.
  • Download Visual Micro. To install it, make sure that Visual Studio is closed. Then you can run the setup program.


Setup Visual Micro when you first start

Visual Studio after installing Visual Micro will appear in the configuration Manager where we can set the basic parameters.



1. Indicates which version of the original Arduino installed.

2. Points to the folder with the installation of the Arduino IDE.

3. If you haven't already installed the Arduino IDE, you can do it now.

4. Additional functions that are not required for the initial configuration.


If you want to use a different version of the Arduino IDE, or if you already have a few set for each of them run a single konfigutację. When you enter the code, you can choose from which IDE you use, using this list:



At any time you can add a new configuration or edit an existing one. To do this, select Configuration Manager.



Pierszwy project

In the original Aruino IDE programs are called sketches. This file extensions .ENO or .PDE placed in folders on the disk. In Visual Studio a program called projects, which also contain several additional files containing the full program. Visual Micro is able to create projects from existing sketches, and create a new one.


Create a new project

To create a new project, select File -> New -> Arduino Project.



Enter a project name and click OK.



The new project contains an empty function setup() and loop() as in Arduino IDE. Now you can write your own code.


Opening an existing sketch

If you have already created a sketch in the classic Arduino IDE, you can use it in your Visual Studio project. Hit:

  • File -> Open -> Arduino Project (by selecting a file with the extension *.Ino or *. pde)
  • File -> Open -> File


Model Arduino and connect

In the same way as in the Arduino IDE, and here before flashing programs on the tiles, you should make a few settings. First select the type of Arduino (in this case DNA). If we use several configurations, you also need to choose the right one.



Then select the COM port assigned to our Arduino.



These settings and the mode selection is also available under menu Tools -> VisualMicro



Build and download the project

If connected properly, the Arduino, we can now proceed to download the program. In simple way you can do this by pressing F5or the green arrow on the toolbar.


The program is compiled and then downloaded to the Arduino Board. The loading progress of thumbnail we can see in the Output window.



In the above example, the selected option is Debug, which creates two assemblies. One with the VisualMicro debugger code, and one without. The debugger is available in the paid version of Visual Micro. Details can be found here.


If we want to compile the program, but without loading, press F7 or in menu Bulid -> Bulid Solution.

Visual Studio to save time compiles only those files that are uncompiled, and those in which changes have occurred. But sometimes when changes are made, for example, in the definitions of #define, you have to compile everything from the beginning. For this purpose, the option Build -> Clean Build.


Errors in the construction

If the compiler will meet on errors displays them in the Output.



Double click on the row with the error will take us to places in the code where the error occurred. Keys F4 and Shift+F4, we can navigate to next and previous error. For error handling, is more useful, however, the window Error List (if not visible, we can invoke them from the menu View -> Error List).



  • Errors - errors that prevent further Assembly

  • Warnings - errors that do not lead to the abandonment of the project, but can cause complications in the execution of the program.


Double-clicking on the error takes us to the place of its occurrence. Visual Studio has a technology called " Intellisense. Improves writing code:



and tries to help in the repair. In this example, the syntax error will be underlined and when you hover the mouse over the error, a tooltip displays.



Intellisense detects errors before you compile, which greatly facilitates writing programs.


Operating tips repair

Sometimes the number of errors is very high. Most often it is the fault of the lack of semicolons or brackets klamrowego. In this case you should click on the first error, and to check whether there is something missing. If we suspect a problem with the curly brackets, we can identify some brackets, but after pressing CTRL+], we upgraded to the corresponding second brackets (depending on the first, opening or closing).


Adding libraries to the project

To add a library to our project, select Project -> Add/Import Sketch Library> Core and one of the installed libraries

Attached to the library is displayed in the form #include . Visual Micro searches for libraries node specified in the Configurator.


Support libraries in Visual Micro

Visual Micro provides the library Manager, which helps in their management. It is in menu Tools -> Visual Micro> Visual Micro Explorer , under Manage Libraries.

The settings shown in the screenshot allow you to install or delete an existing library. Alternately

  • All - shows all available libraries installed and not installed in alphabetical order.
  • Installed - Shows only installed the library. Pressing on, we cannot remove them.
  • Available Updates - Shows the installed libraries that will be available updates. Clicking on do not update the library.
  • Arduino - Shows all the libraries provided by Arduino. Most of the preset.
  • Maintainers - Group library according to the teachers (people who are engaged in libraries after the publication of the author)
  • Categories - Group your music by categories


The use of examples coming from the library

Most libraries provide simple examples of their use. Visual Micro to use these examples you must choose menu Tools -> Visual Micro> Visual Micro Explorer bookmarks Examples.

When you click on one of them opens the following selection window:

  • Open Copy - Creates a new projet as a backup, for example, and places it in a folder with Arduino projects.
  • Open Original Opens, for example, as a project in its original location. Thus, we can change, for example, from the library. This option is not recommended.
  • Browse Source to see the file tree and allows you to select a single file. Creates a new project. However, this option opens the source file, so we recommend that you save it immediately under another name.


The above tutorial is intended to show the capabilities of Visual Micro and show that he can be a good alternative to the Arduino IDE, which lacks many features. The full documentation for Visual Micro can be found on the project home page: