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,
To install VisualMicro will need the following programs:
(note: Visual Micro does not work with Express versions of Visual Studio)
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.
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.
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.
If you have already created a sketch in the classic Arduino IDE, you can use it in your Visual Studio project. Hit:
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
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.
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.
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).
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 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
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:
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: http://www.visualmicro.com/