Microsoft Visual Studio 2010 Free for 3 years?

by Visual Micro 28. October 2011 09:39
It was already possible for students and teachers to obtain a free version of Visual Studio 2010 Professional but now this Microsoft offer has been extended to a number of other groups. One group being any individual who is thinking about becoming a web developer.
 
The extended Microsoft offer provides immediate download and 3 year license for a huge range of products such as Visual Studio 2010 Professional. This appears to open the door for Visual Studio to just about everyone in the arduino community.
 
To take advantage of the offer you will need to sign up for the free Microsoft WebSiteSpark program. Once you have signed up you will see a big button allowing you sign up for downloads. The big button actually signs you up to the microsoft developer network (msdn) and looks like the following image.
 
 
If possible, use the Web Download option because it is simpler. Otherwise, to the right of each "download link" is a link that will show your personal license key for the selected product (keep it private) http://www.microsoft.com/websitespark/
   
As an alternative, after you have signed up for websitespark, you can logon directly to msdn http://msdn.microsoft.com/en-us.
 
After you logon to msdn you will find the "msdn subscriptions" downloads on the right side of the screen.
 
For more options also notice the "View complete list of available downloads" option.
 

Arduino for Visual Studio

After installation you may optionally install the free Arduino addin for Visual Studio using this download link or by selecting download from the right hand menu bar.
  

Visual Studio Gallery

There is also a large gallery of other useful tools for Visual Studio. You can view the Visual Studio Gallery here http://visualstudiogallery.msdn.microsoft.com/

 

 

How to add an Arduino library using Visual Studio

by Visual Micro 27. October 2011 08:46
Add an arduino Library using the project menu
The 2nd entry on the Project menu allows libraries to be added
 
When adding libraries the #includes are automatically added to the master .pde source.
You must click "Save" before the intellisense will detect the new libraries.
 
Optionally toggle the library sources in/out of the visual studio project using "Project>Show all Arduino files".
Including the actual library sources codes does not break the compiler but allows the libraries to be explored using the Visual Studio object browser

How to fix android build.xml errors in processing 1.5>2.0 beta

by Visual Micro 22. October 2011 17:05

Updated 05 November 2011

This issue will shortly be resolved by Processing 2.0 alpha 3

http://code.google.com/p/processing/downloads/list

The following information applies only to earlier processing builds to Processing 2.0 alpha 3 and should be ignored

The following solution worked for some of us but might not be what is required by others.

Some people have reported this solution works for them, others have complained angrily that this did not help them. If you are someone who can't be bothered to read instructions or you are a person who complains when given something for free that doesn't work, then close your browser now.

There are a few problems in as much as the ant system has changed in 14 which means that processing.org and all other android apps that use ant will now fail. To make matters worse the android sdk download repository format has changed so you can't use an older sdk manager to download older api sources (such as 7 & 8).

If, like me, you don't need the versioin 14 api then you can get processing working on windows as follows:-

1) Download android sdk 14. You have no choice!

NOTE: I had problems with the android sdk when installed into "Program Files" bacuase of the space in the folder name. I used "c:\android\android-sdk" in the end

2) When the android sdk manager runs, de-select everything
3) Select and download version 7 & 8 api along with associated google api
4) Follow the processing android instructions for enviroment variables
5) Finally, install r12
over the top using one of these google links

  1. http://dl.google.com/android/android-sdk_r12-windows.zip
  2. http://dl.google.com/android/android-sdk_r12-mac_x86.zip
  3. http://dl.google.com/android/android-sdk_r12-linux_x86.tgz
  4. http://dl.google.com/android/installer_r12-windows.exe

You end up with api versions 7&8 installed using sdk manager v14 but you will be running with sdk manager v12. If you already have 14 installed along with the 7&8 api then just install r12 and set the enviroment variables.

 A few people have asked about the enviroment variables. This is how mine are set :-

 1) I don't know if these are required, I ran out of testing time. On my test machine the android sdk is installed in C:\Android\android-sdk. I have appended the following syntax to my path user variable.

 ;C:\Android\android-sdk\tools;C:\Android\android-sdk

 2) I added a System variable called ANDROID_SDK and set its value to C:\Android\android-sdk

How to configure Arduino code "color coding" in Visual Studio

by Visual Micro 9. October 2011 09:41

Due to a VS bug 10.11+ versions require you to manually tell visual studio to color code your arduino code.

1. Open the Visual Studio Tools>Options

2. Navigate to Text Editor>File Extensions

3. Add the INO and PDE extensions setting the Editor to "Microsoft Visual C++" for each

4. Click OK and re-open any open sketch code files

This is what you should see once you have made the changes

Note: Users of versions earlier than 10.11 who encounter random color code failings should remove the extensions from the above list. Click OK and then re-add them as shown above

Arduino Visual Studio User Interface Images

by Visual Micro 7. October 2011 18:25

The Visual Studio Tools menu will automatically enable and disable when an arduino board or xbee is connected. We can override arduino programmer settings from within visual studio

Arduino Visual Studio Tools Menu

The Visual Studio "Tools" menu example below is taken from a machine that did not have a connected serial port.

Various arduino command are added to visual studio in all relevent positions such as the Standard Tool Bar shown below

Arduino Visual Studio Create New Arduino Project Using the Visual Studio Standard Tool Bar

The Visual Studio Tools menu allows an arduino board to be selected for a visual studio project as does the boards list on the tool bar

Arduino intellisense in Visual Studio is fully available and automatically built from any arduino sketch

Arduino Visual Studio Intellisense for the Selected Arduino Board

Multiple sketch projects in a single solution are fully supported. F5 will compile and upload the Visual Studio "Start Up" project. Board and Serial port can be selected for each sketch project.

Arduino Visual Studio Multiple Sketch Projects in a Single Visual Studio Solution

Ultra fast intelligent visual studio arduino compiler

Arduino visual studio ultra fast arduino compiler

 

Unlimited serial viewers in Visual Studio auto pause and re-start during upload to an arduino board. All arduino and user conditional compiler directives are fully visible as you code

Unlimited serial viewers in Visual Studio auto pause and re-start during upload to an arduino board. All arduino and user conditional compiler directives are fully visible as you code

Arduino Visual Studio Dockable Serial Port Tool Windows

by Visual Micro 5. October 2011 20:53

Visual Studio dockable serial tool windows can be used for arduino and for many other applications.

The arduino boards' serial tool window will automatically pause during an arduino serial upload

 Arduino Visual Studio Example of Dockable Serial Ports Tool Windows

Arduino Visual Studio Examples and Images

by Visual Micro 5. October 2011 17:42

The Visual Studio>Tools>Serial Ports menu will automatically enable and disable when arduino boards or xbees are connected. We can override arduino programmer settings from within visual studio

Arduino Visual Studio Tools Menu

The Visual Studio "Tools" menu example below is taken from a machine that did not have a connected serial port.

Various arduino command are added to visual studio in all relevent positions such as the Standard Tool Bar shown below

Arduino Visual Studio Create New Arduino Project Using the Visual Studio Standard Tool Bar

The Visual Studio Tools menu allows an arduino board to be selected for a visual studio project as does the boards list on the tool bar

Arduino intellisense in Visual Studio is fully available and automatically built from any arduino sketch

Arduino Visual Studio Intellisense for the Selected Arduino Board

Multiple sketch projects in a single solution are fully supported. F5 will compile and upload the Visual Studio "Start Up" project. Board and Serial port can be selected for each sketch project.

Arduino Visual Studio Multiple Sketch Projects in a Single Visual Studio Solution

Ultra fast intelligent visual studio arduino compiler

Arduino visual studio ultra fast arduino compiler

 

Unlimited serial viewers in Visual Studio auto pause and re-start during upload to an arduino board. All arduino and user conditional compiler directives are fully visible as you code

Unlimited serial viewers in Visual Studio auto pause and re-start during upload to an arduino board. All arduino and user conditional compiler directives are fully visible as you code

 

The Visual Studio "project" menu contains a number of arduino commands related to the active project, some of which are shown below

 "Show all arduino files" is for advanced users who would like the arduino core and "selected libraries" source codes included in the Visual Studio solution

The Visual Studio Project menu contains a number of Arduino commands related to the active Project

 Visual Studio has serial tool windows for arduino or any other project

 Visual Studio has serial tool windows for arduino or any other project

How to test a new installation of Arduino Visual Studio

by Visual Micro 4. October 2011 09:29

Arduino for Visual Studio is designed for users who already understand how to use the Arduino IDE. The Arduino for Visual Studio add-in provides many ways to create, manage, compile and upload Arduino sketch programs using Visual Studio. The add-in extends the Visual Studio menus and tool bars by providing easy to use options that ensure your sketch programs adhere to the Arduino rules.  
 
To avoid confusion, new users should use the Arduino commands in Visual Studio in preference to standard visual studio commands. If you are new to both Arduino and to Visual Studio then you MUST use the Arduino commands because you won't know the Arduino rules. You will see that the Arduino commands have an Arduino icon next to them.
 
First Time User Guide

  • Install the arduino software from arduino.cc
  • Run arduino once
  • Install this software
  • Depending on your security settings you might need to run Visual Studio as Administrator to either install or reset the arduino addin
  • Open Visual Studio and set the location of the arduino.exe in "Tools>Options>Visual Micro>Arduino>Arduino Application"
  • Register .pde (and .ino) files for color coding by following this article

 
The following are a few ways to test your Arduino for Visual Studio installation
 
Method A - Create new arduino sketch (automatic mode)
 
Open visual studio. From the "File>New" menu select "Arduino project". When prompted, enter the name of a new arduino sketch such as "MyFirstSketch". Click OK
 
You should see a new arduino project is created containing an arduino sketch called MyFirstSketch.pde
 
Add your own arduino code to the void loop() {}
 
Select an arduino board from the list and click "Build Solution" from the "Project" menu


You should see a successful arduino compile in the "Sketch Build" output window



Tip: The same functionality is available from the Visual Studio "Standard" tool bar and also the "Solution Explorer" context menu



Method B - Open an existing sketch (automatic mode)

In visual studio select "File>Open" then click "Arduino Project". You will be presented with an "Open File" window which will display your arduino sketch folder. Select a sketch and click OK.

A project will be automatically created for the sketch and the arduino source codes automatically added to the project.

Add your own arduino code to the void loop() {}

Select an arduino board from the drop down list of boards and click "Build" solution from the "Project" menu

You should see a successful arduino compile in the "Sketch Build" output window


Method C - Open an existing sketch (semi automatic mode)

In Visual studio selected "File>Open>File". Navigate to an arduino sketch folder and select a .pde file. Click OK

You will be asked if you would like to Open or Create a project for the arduino sketch. Click OK.

Add your own arduino code to the void loop() {}

Select an arduino board from the drop down list of boards and click "Build" solution from the "Project" menu

You should see a successful arduino compile in the "Sketch Build" output window


Method D - Creation of a new arduino project (manual mode)

In Visual Studio create a new empty C++ project called "MySketch3" in a folder called "MySketch3"

Add a new text file to the project and call it "MySketch3.pde"

Add your own arduino code to the void loop() {}

Select an arduino board from the boards list

Select an arduino board from the drop down list of boards and click "Build" solution from the "Project" menu

You should see a successful arduino compile in the "Sketch Build" output window


This product is not "associated to" or "endorsed by" Arduino. The design of the sketch compiler and uploader is directly based on the arduino source code

Compilation errors after removing an Arduino file from a Visual Studio project

by Visual Micro 3. October 2011 16:32

Removing a file from a Visual Studio project does not remove the file from the Arduino sketch. You have to follow the Arduino rules when working with Arduino projects in Visual Studio.

The Visual Studio Arduino compiler entirely mimics the Arduino development system which doesn't know about Visual Studio projects. The Arduino system uses all of the source code files in a folder.

So you must move or delete your unwanted Arduino source files.

Note

After removing files from a Visual Studio Arduino project, if you close and re-open the project, you will notice that the files you removed re-appear. This is because the Arduino for Visual Studio application validates Arduino projects when they are opened (applying the Arduino rules). The intention is to ensure compatibility with the Arduino development tool allowing you optionally compile sketches in either product.

How to reset the arduino visual studio interface

by Visual Micro 1. October 2011 22:11

It might sometimes be useful to remove all of the arduino commands from the visual studio interface and reset the addin

Visual Studio (devenv.exe) provides a standard switch '/resetaddin' which will perform this function

The arduino addin uses the following key 'Visual.Micro.Visual.Studio.Arduino.Helper'

To reset the arduino addin, run visual studio passing the following /resetaddin command

 Depending on your security settings you might need to run Visual Studio as Administrator to either install or reset the arduino addin

  • Close all IDE instances.
  • Open a Visual Studio .NET Command Prompt ("Run...", "Programs", "Visual Studio .NET", "Visual Studio .NET Tools", "Visual Studio .NET Command Prompt")
  • Enter "devenv.exe /resetaddin Visual.Micro.Visual.Studio.Arduino.Helper" (without the quotes) and press ENTER
  • Close all IDE instances.
  • Microsoft have changed visual studio. The command  prompt might now be available in the microsoft power tools extension

     

    Arduino for Visual Studio - Release Notes

    by Visual Micro 26. September 2011 10:40

    26 September 2011 - Finishing the user interface with a view to preventing the addin from cluttering the already busy visual studio interface. This means integrating our menu items into the standard Visual Studio menus.

    For example:- File.Open,File.Add,Toolbar.Add New Item,Toolbar.Add New Project,Project.Add New Arduino Item,Project.Add Arduino Library,Project.Set Board,Project.Set Upload Using,Build.Project,Build.Solution,Debug.Start,ProjectExplorer...,SolutionExplorer...

    The next version is a complete rewrite offering at least the same functionality offered by the Arduino development tool. The final work is to ensure that we are also Arduino1 compatible which includes support for the new Arduino file extensions.

    We now use standard visual studio commands such as F5 build and upload, double click goto error, simpler setup .The intellisense is complete and the compile/upload works fully. We can even burn new bootladers. Support for single or multiple solutions containing single or multiple sketches is included as standard. There is also a new api allowing arduino plugins to be created for other development systems.

    The new version will be released over the next week. Please register in the forum if you would like to be notified when new versions are published.

    Version 2 Preview - Complete Clone of Arduino ++. Multi sketch, multi serial, high speed compile, full intellisense, simpler setup

    NB: Initially for VS2010. A VS2008 version will also soon be released. Visual Studio Express is not supported

    Visual Studio Arduino Object Browser

    by Visual Micro 2. May 2010 17:17

    The visual studio object browser simplifies browsing of arduino/wiring libraries, custom libraries and your own code.

     

    What does it mean when Visual Studio disables an addin

    by Visual Micro 11. April 2010 21:56

    If Visual Studio 2005/2008 encounters a problem with an addin it will disable it by altering the addin xml.

    To enable the addin again ensure the addin xml is in the "\document\visual studio x\addin\" folder, as per the installtion guide, and ensure the following settings are in the .addin xml

     <LoadBehavior>5</LoadBehavior>

    <CommandPreload>1</CommandPreload>

    <CommandLineSafe>1</CommandLineSafe>

    How to link an arduino code library to a visual studio project

    by Visual Micro 11. April 2010 19:56

    Add an arduino Library using the project menu

     
    The 2nd entry on the Project menu allows libraries to be added
     
    When adding libraries the #includes are automatically added to the master .pde source.
    You must click "Save" before the intellisense will detect the new libraries.
     
    Optionally toggle the library sources in/out of the visual studio project using "Project>Show all Arduino files".
    Including the actual library sources codes does not break the compiler but allows the libraries to be explored using the Visual Studio object browser

    How to select an arduino serial port in a visual studio project

    by Visual Micro 11. April 2010 17:20

    The serial monitor is not included in the initial version of visual micro. Therefore the serial port need only be selected to upload to an arduino board using visual studio. An arduino serial port is select using the tool bar drop down menu as show below. When the project is next opened the addin will reselect the same port.

    The serial ports menu is dynamic, the menu will detect changes to the connected serial port list of the computer (even whilst the menu is dropped down). The list is in order of device connection. These features are especially useful for device identification when working with multiple boards and ports

    Example 1 from older software version

     

    Example 2

     

    Uploading will invalidate your arduino warranty, we accept no liablity should any problem arise from using this tool to upload to arduino

     

     

    Using the arduino boards menu in visual studio

    by Visual Micro 11. April 2010 16:59

    The visual studio tool bar provides a way to select which arduino circuit board each project will use

    When a board is selected, all of the items in the "_core" filter are removed and replaced by the files from the newly selected boards arduino core

    If the _core filter does not exist then it is created. In the example below, the board is about to switch from "atmega168" to "arduino mega"

    In the current visual micro version the include and source files are automatically separated into "inc" and "src" filters (see below)

     

     

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

    by Visual Micro 11. April 2010 16: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!

    How to automate arduino development using visual studio

    by Visual Micro 11. April 2010 11: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.

    Example

    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

    How to enable arduino Intellisense in visual studio

    by Visual Micro 11. April 2010 10:40

    2nd may please see archive for visual studio 2010 intellisense ardupilot overview

     

    The visual micro addin provides intellisense using visual studio for all arduino core, library and your own project files

    If you add or link your own files to a visual micro project and the intellisense doesn't detect them. Just click compile on the tool bar (or rebuild the vs project)

    Click CTRL+J in your code to see a master list of properties. See example...

    When switching board, when adding an arduino library or when you add or link multiple existing files to a project you will see the background progress for the intellisense update

    If your arduino intellisense stops working (somestimes happens with visual studio) then shutdown visual studio and delete the .ncb file of the project (it's in the projects folder). Important - Only delete the .ncb!

     

    How to setup Arduino .pde sketch files for visual studio intellisense

    by Visual Micro 11. April 2010 00:30

    There are two settings to apply when configuring an arduino sketch to be recognized in visual studio as a c++ file. Both settings are accessed in visual studio via tools>options

    Register pde (sketch) as a C++ file allowing both intellisense and code formatting to be displayed/applied

     

     

    Tips & Bits

    Connect two or more arduinos and spy on the serial communication using visual studio and "Serial Echo"

    Coming soon! Android and Processing for Visual Studio

    How to prevent or remove Visual Studio pch folders

    How to configure visual studio color coding for arduino source code

    See more Examples

    We can use different arduino engines to power our visual studio addin. However, please use the arduino 0022 engine until we have an arduino 1.0 solution.

    The new version of Arduino for Visual Studio includes initial suport for the new arduino .ino file extension. You can not yet compile for arduino 1.0 but you can compile sketches containg a mix of .pde and .ino sketches.

    Multiple sketch projects and windows projects can co-exist in a single solution. Fully integrated. F5 Compile and upload (startup project). Build Project, Build Solution