I am trying to compile APM 2.1 with Arduino 0020 and I am getting the following error message:  "C:\Users\Kevin\Documents\Arduino\libraries\APM_RC\APM_RC.cpp:27:3: error: #error Please check the Tools/Board menu to ensure you have selected Arduino Mega as your target."

In the Tools/Board menu I have the Arduino Mega 2560 selected. 

This error occured without any changes to the file and some changes to the AMP_Config.h $ file.  

Tried also using Arduino 0022 version but had a ton of compiling issues 

Thank you for any assistance

Views: 417

Reply to This

Replies to This Discussion

I can upload the file from APM Planner to my 2560 board but I believe I need to make changes to the files.  I need to set baud rates as I can only get Xbee comm at 115200, turn on GPS MTK, and enable airspeed.   I fixed the compile  issue above and ran into a ton of other compile issues, mostly indicating the libraries are missing.  I have set the preferences to the correct directory.  I tried copying all the Mega library into the Arduino library directory.  No love here.    I think I can set most of the other settings in APM, but such a simple task seems quite elusive.
If you must use Arduino, the instructions are here:
http://code.google.com/p/ardupilot-mega/wiki/Code

Libraries are indeed tricky to get right, which is why we've made it so that almost everyone will be able to use the Mission Planner and CLI to setup APM. We really don't want to deal with Arduino setup questions and user confusion anymore.

There is no need to use Arduino to turn on GPS MTK and enable airspeed. The GPS is now autodetected as is airspeed.

Why do you need Xbee comms at 115200? Anyway, if you do in fact need to deviate from the default 57k, add this line to the APM_Config.h

#define SERIAL3_BAUD 115200

All configuration options are here:
http://code.google.com/p/ardupilot-mega/wiki/AdvancedConfig
I'm having the same problem. The reason I want to use Arduino is that I can write some code to add a separate temp and pressure sensor. V1.0 wont work for what I'm trying to do because I want to use the current sensor and its not supported in this version. What do I need to change with the libraries? V 1.0 worked fine with my board once I uncommented some things, is it s similar process to get V 2.11 to work?
Shayne: I'm afraid I don't understand your question. V2.11 compiles fine if you've set Arduino up right, as described above (and in the manual). What problem are you having?
I believe I've set things up right as per the manual but then again why would I be getting this error right. I've probably missed something. I didn't have problems with the older version, just this one. I've gotten a couple errors now, one says 'AP_Int16' does not name a type and 'get_log_boundaries' was not declared in this scope.
Attachments:
As I thought, you're using an old version of Arduino. You need to be using 022.
Wow, like I said I was probably missing something, I just didn't think it was so simple. Thanks ill download that right away. Hey while I have you, where would be a good place to go to find some info about adding sensors like an extra pressure and temp sensor. I know its stated in the manual to start with the magnetometer library and go from there, but has anyone already made one for the APM?
Depends on whether the sensors are I2C or analog. If I2C, start with mag library. If analog, you can connect them to any spare analog pins, such as the pitot pins.

I don't know of anyone who has already written a generic library for adding other I2C sensors. It should be straightforward, but I don't think anyone else has found another sensor they felt they needed.

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service