So i have spent some time programming with the ArdupilotMega + Shield combo and i just realized that my Accelerometer does not read all 3 axis. Using the APM_ADC test code, channel 3 always posts a steady 1550-1552 reading. Im not sure what is going one.
Although this is not posted anywhere this is what i have assumed based on all the code i have seen for the APM shield.

Gyros = channels 0,1,2
Accel = channels 3,4,5
Pressure = channel 6? 

Is this correct? Channel 6 also produces a steady almost unchanging signal.
Or is my shield defective?

Views: 501

Reply to This

Replies to This Discussion


Here is what I believe to be the correct ADC channels on the latest version of the IMU Mega:

Serial.print(APM_ADC.Ch(4)); //X-Acel
Serial.print(APM_ADC.Ch(5)); //Y-Acel
Serial.print(APM_ADC.Ch(6)); //Z-Acel
Serial.print(APM_ADC.Ch(2)); //X-Gyro
Serial.print(APM_ADC.Ch(1)); //Y-Gyro
Serial.print(APM_ADC.Ch(0)); //Z-Gyro
Serial.print(APM_ADC.Ch(3)); //Temp
Serial.print(APM_ADC.Ch(7)); //Aux

Channel three, being the temperature, will show what you are reading. I get similar values.

Hope this helps.

Ok so it seems afterall the aeroquad beta code had it correct. It was still not giving good readings though. Is Channel 7 the air pressure sensor?
My serial monitor is spitting out some crazy stuff. Do I need to make any changes to the sketch? I checked off the advanced port settings in device manager. but it still does not make any sense.

Just Got it!!! had to set serial monitor to 57600
No, the pressure sensor is I2C.

Channel 7 is open for expansion.
Yeah, You need to make sure to match the BAUD of the Serial monitor, and the Serial.begin() function in your code.
Ohh well that makes alot of sense. Thanks! Im a newb when it comes to understanding eagle files and stuff, but i guess thats expected when its a CS major looking at it.

Are there any libraries that implement the pressure sensor already?

Thanks Again,

Never mind. It seems Jordi and Julio already got around to that. All the libraries for the APM are now in here. http://code.google.com/p/ardupilot-mega/downloads/list
ok, now it is displaying somthing that I can read but it does not change when I tilt the board. this is the output: 1680,1680,1674,1575,2365,2046,2287,

thanks for your help in advance.

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service