3689349821?profile=original

A few weeks ago the new version of the free Visual Micro addin for Visual Studio was released. The addin provides full featured, 100% compatible, arduino development inside all Visual Studio 2008 and 2010 versions (except for express). This release means that we can code, compile, upload and burn bootloaders to any Arduino microprocessor using Visual Studio. Arduino for Visual Studio can be downloaded from here 

3689349781?profile=original Click to see more example images of arduino visual studio

 

 

 

The addin provides complete compatibility with all arduino libraries and cores, in addition to intellisense, goto compiler errors and many other useful features. One useful example is the "Auto Pause" and "Auto Resume" of serial before and after upload (unless using ISP). 

 

Multiple ground station and/or uav projects can be organised in a single Visual Studio solution

3689349786?profile=original

 

Compiler #defines are shown clearly in all source code. A high speed compiler uses file modification times to optimise the work required. Below you can see that an arducopter compile was completed in 5 seconds. An unlimited number of serial tool windows are available.

 

This example shows the compilations resulting from clicking a visual studio "Build Solution" command.3689349834?profile=original

Note:  The ArduCopterMegaHybrid project is a full arducopter program with a minor change to the "pwm out", it's switched to i2c for the SD21 servo board. This project is not available for release it just happened to be available to demonstrate the speed of the visual studio arduino compiler

 

There are a few un-documented features still to be tested. One, for example, is an option to switch on support for parent library folders. This might be useful for diy drones projects that require two different versions of the same library. The feature allows the compiler to look for an additional "Libraries" folder in the parent folder of the current sketch.

 

Another feature we might find useful is a menu command that toggles all related sources in/out of the current project. "Project>Show All Arduino Files" does not affect sketch compilation, instead, this feature includes the sources of the arduino core and all of the libraries that have been "#included" into the current sketch. This makes is very easy for library developers/explorers to optionally work with libraries and core within their sketch projects.

 

Read more about Arduno for Visual Studio

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • @robert just so that I am clear. Is the arducopter sketch (pde) in

    C:\Documents and Settings\Robert\My Documents\Arducopter_2_0_49\Arducopter_2_0_49

    ?

  • @robert - are the other files displayed in the visual studio solution explorer? they don't automatically open but should automatically be in the solution explorer?

  • No wait, now it seems to have opened up some of the libraries under "external dependencies" in the solution explorer box on the right.  But most of the other files are not open (software serials?), such as attitude.pde.

  • Nope, I don't have Add Arduino Library.

     

    I still can't open the Arducopter project.  I mean, I have the plug-in installed, I even just re-ran that plug-in installer, no difference.

     

    I just noticed that VS created some new files in my Arducopter director, they were called Arducopter.xxx a number of files, can't remember the extensions.  I deleted them all, now Arducopter does open in VS???

     

    Still no libraries, and no add library menu.

     

    Maybe I've just got them in the wrong place?  Here's what my structures look like, the files are in both these directories.

     

    C:\Documents and Settings\Robert\My Documents\Arduino\arduino-0022\libraries

    C:\Documents and Settings\Robert\My Documents\Arducopter_2_0_49\Arducopter_2_0_49\libraries

     

  • @robert (updated) don't worry too much it will work. 1500 people have downloaded it in the last few weeks and we have many reports of happy users so it is worth persisting. I think you just have addin setup or load issues. I really need to know the answer to my question about the "add library menu". Do you have "Core" and "User", can you see libs on both of these menus?

  • I don't even know what the system has done now.  Can't open the project anymore with VS, but can with Arduino.  Now I get "The project does not contain a sketch with the same name  (Arducopter.pde or Arducopter.ino), but the file is very obviously in the folder.

  • @Robert one important thing. The VS system works the same way as arduino, it sits on top of arduino. The fact that you have had to install the arducopter libs suggests that you have a new installation of arduino or AP? If so then the easiest thing to do is to get the arducopter code compiling in arduino using the standard diy drones wiki guide. Once it works in arduino is should work in Visual Studio. If not then please let me know

  • @Robert Yep somethings up, that isn't right. You can see the sketch project files in the solution explorer but the system can't find the libraries or is running into some other problem.

    By the way you can install libraries as you have done in arduino\libraries or in the "[sketch folder]\Libaries" which is often mydocuments\arduino\libraries.

    Question 1

    On the top section of the "Project" menu can you see "Add Arduino Library" and if so when you click it do you see all the Arduino and APM libaries under "Core"? NB: An arduino library is SoftwareSerial

  • @Fab.  I don't see Project>Show All Arduino Files ?

     

    So I've got it open, I can see the main Arduino.pde, and all the "side branch files" (what is the proper name for these?) such as attitude.pde, Camera.pde, etc.  But, the libraries don't seem to be included.

     

    So if I go to the line: #include <AP_IMU.h>, right click on AP_IMU.h and select Open Document, it gives me an error, can't find that file.  I think related to this problem, if I go to the variable read_barometer, right click on it an "Go To Definition" it says it can't find the definition.

     

    What have I done wrong?  I know when I first tried using Arduino, I made the mistake of not copying the libraries from the Arducopter file into the Arduino library folder. 

  • @Ralph,

    I used Eclipse for a long time with Arduino. I was always impressed by the speed of Eclipse compared to the Arduino IDE. Until I used the Visual Micro for VS2010 plug-in. It is lightning fast. A lot faster that the Eclipse AVR plug-in. The strange thing is that they both use the Arduino tool chain.

This reply was deleted.