Hi all,

  I've recently received the legacy Ardupilot and am trying to put everything together. I actually bought all the sensors separately (did not purchase the sensor shield from the DIYd store), and have been looking through the code to try to hook it up. Some issues:

A) Cannot find a pin declaration anywhere for reading airspeed data, though I think it should be A3. Am I overlooking some corner of the code? I did find the functions for reading data under the sensors tab.

B) Cannot find anything on the reading of the barometric sensor, period. Where can I find it?

C) More about coding than Ardupilot in particular: I haven't before used sketches with tabs. How does opening one .pde file allow all of them to appear in window? Also (using sensor tab as example), in the read_airspeed function, the main code is surrounded by "#if ... endif#". Why are the pound signs there? C++?

Thank you in advance for your help. :]

Tags: Ardupilot, absolute, airspeed, barometric, pressure, sensor

Views: 173

Replies to This Discussion

A) File: defines.h and line: #define AIRSPEED_PIN 3 // Need to correct value

B) File: sensors.ino and the function of: void read_airspeed(void), that will be called from Ardupilot.ino function of : void fast_loop() depending on #if AIRSPEED_SENSOR == 1 && GPS_PROTOCOL != 5  directive condition evaluates to a  value of TRUE.

C) Folder of Ardupilot=Ardupilot.ino (the main file), other C/h/ino files in this folder will be opened as Tabs. The # symbol is for C Macro preprocessor. Try en.wikipedia.org/wiki/C_preprocessor

Hope it helps.

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

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service