Can't Use Arduino Functions in APM Code


We are trying to modify the ArduCopter code for our project. However, whenever I try to use standard Arduino functions, Arduino IDE gives the error “… was not declared in this scope” no matter which library I try to include and use. I have tried the Wire.h library and basic functions such as Serial.print(), Wire.begin() and so on.

Any help would be appreciated.

Use Eclipse C++ IDE, not Arduino, the Arduino support have been removed years ago.

I have installed the Eclipse C++ IDE by following the instructions in the ArduCopter wiki. However, when I try to build the code I get the “make apm2 …/mk/ *** ERROR: cannot determine sketchbook location - please specify on the commandline with SKETCHBOOK=. Stop.” error.

Any idea?