"One Click" add new source and header file(s)

by Visual Micro 11. April 2010 13:57

In the lestest product version the following functionality has been moved to the standard visual studio menus such as File>New or right mouse click project "New"

The "New" menu contains two very useful options enabling new files to be quickly added to an arduino visual studio project . This is a useful features if you often need to add a new .c and .h files to your projects.

note: To add files to your arduino projects in visual studio you can always use the standard visual studio "add file" or "add existing file" options.

Workflow Objective

Create a new .c file named MySubFile.c to the project (if it does not already exist) folder and link it to the project "Source Files" filter

Create a new .h file named MySubFile.h to the project folder (if it does not already exist) and link it to the project "Header Files" filter

Insert an #Include for MySubFile.h to the currently active source file (or .pde)

Open the new files for editing

How To

1. Choose to add .c/.h or .cpp/.h

2. Provide a name for the new files

3. Visual Micro does the rest!

Automate arduino development using visual studio

by Visual Micro 11. April 2010 08:16

You may add any of the visual micro arduino commands to the visual studio tool bars and menus. You may also reference the commands in your visual studio macros. Serial ports, libraries, boards are also available as commands.


The "Arduino Mega" will appear as a visual studio command (Tools, Customise), COM23 (if it exists) will also appear as a command, the SoftwareSerial library will also appear as a command.

Therefore you could add there new tool bar buttons for each providing a "one click" option to select options you use regularly. or you can create a workflow (macro) that automatically selects the "mega" board, sets COM23 and includes the software serial library into the current project.

Example: Customise Visual Studio Arduino Commands


Unsupported Upload Note

The compiler outputs .hex files into the <project>\_vsaddin\_build folder. The addin projects can be run from the visual studio command line. This makes it possible to design windows applications using visual stuidio that upload different arduino sketches based upon conditional factors. If you use the arduino visual studio compiler or the arduino uploader then please beaware that no liability is accepted by us and that you will break your arduino warranty