Sunday, November 25, 2012

Arduino Software Development using VS2010

For software development I've decided to use VisualMicro, Arduino for visual studio. As a plugin, it integrates well with the Microsoft Visual Studio environment. This choice was based on the fact that I am familiar with the Microsoft Visual Studio tools, and they have a debugger available. I also downloaded and used the "standard" Arduino IDE, but I found it lacks a rich and robust UI.

The plug-in installation was not exactly straight forward and creating a project took some trial and error. When creating a project, and subsequent solution, the c++ style arduino sketch files were not recognized and would not compile. The instructions have you make the following c++ associations:

This indicates that these files will be associated with c++ projects. The problem I found (in my installation?) is that by creating a raw Arduino project (and subsequent solution) creates what appears to be c++ project, but most of the time (always?) main can't find the setup() and loop() functions that are defined in the .ino file even though it is associated correctly.

My workaround is to create a C++ project/solution first. Then I simply delete the c++ project and add a new Arduino (c++) project to the solution.


This works every time, although it is a little cumbersome. There is a possibility I have some setting(s) wrong, but if you read through the "test installation" directions there are some even more convoluted ways to setup an Arduino project.

January 2013 Update: I discovered that I can't (shouldn't?) use and dashes (and perhaps underscores) in the project name. Although I don't get a file naming error, the compile may indicate that main can't find setup() and loop().


No comments:

Post a Comment