I have code that uses the ADUINO define to distinguish between arduino 1.x and previous versions. That is eesential as the one uses Arduino.h and the other WProgram.h as a central include.
Unfortunately the VisualMicro addon defines ARDUINO as 10 and so the conditional defines in standard arduino code fail. Then WProgram.h is included instead of Arduino.h.
Code example:
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
The above will use WProgram.h if compiled with VisualMico as ARDUINO is defined as 10 and not 100.
See also arduino release notes: http://arduino.cc/en/Main/ReleaseNotes
Comments: Hi there, This is an important part of all Arduino builds and other than 1.0 it works fine. So 1.0.3 certainly works. To change your arduino version you need to open "Tools>Options>Visual Micro" and set the Arduino Application location to 1.0.3 then re-start VS. If you still have the problem then it means that a VS process has not shutdown properly. In this case, close VS, open "Task Manager" and terminate the devenv.exe processes if there are any, then re-start VS. Until you resolve the problem, you should also switch on Tools>Options>Compiler>Verbose so that you can see exactly what options VM is using. __Please join the forum at visualmicro.com. It is easier for me to provide support via the forum. This issues list system is very crude and difficult to manage. __ Thanks
Unfortunately the VisualMicro addon defines ARDUINO as 10 and so the conditional defines in standard arduino code fail. Then WProgram.h is included instead of Arduino.h.
Code example:
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
The above will use WProgram.h if compiled with VisualMico as ARDUINO is defined as 10 and not 100.
See also arduino release notes: http://arduino.cc/en/Main/ReleaseNotes
Comments: Hi there, This is an important part of all Arduino builds and other than 1.0 it works fine. So 1.0.3 certainly works. To change your arduino version you need to open "Tools>Options>Visual Micro" and set the Arduino Application location to 1.0.3 then re-start VS. If you still have the problem then it means that a VS process has not shutdown properly. In this case, close VS, open "Task Manager" and terminate the devenv.exe processes if there are any, then re-start VS. Until you resolve the problem, you should also switch on Tools>Options>Compiler>Verbose so that you can see exactly what options VM is using. __Please join the forum at visualmicro.com. It is easier for me to provide support via the forum. This issues list system is very crude and difficult to manage. __ Thanks