IMU: Runs Infinitely!! Help Required...

Hi All,

I was running ArduPlane2.60 library example under arduPlane/libraries/APU_IMU/IMU_Oilpan_test.pde

I just want to check the reading of gyro's and accelerometer. However, when I run the program it gets stuck in setup() here:

imu.init(IMU::COLD_START, delay, flash_leds, &adc_scheduler);
imu.init_accel(delay, flash_leds);

Acceleration does not initiliaze even though my board is resting on the table. It KEEPS ON calibrating it infinitely. 

However, if I see this code in main Arduplane.pde code, they used MavLink delay and here it is just a delay passed into as function pointer. Can I overcome this without using MavLink??

I tried running ArduPlane 2.26/ 2.40/ 2.50 example, all the same result.

Any clue/ help will really be useful..

Thank you..

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hi Shyam.

    I have just spent about half an hour trawling through the header files and have finally solved it. The problem lies in the file AP_InertialSensor_Oilpan.c

    The values for _accel_scale.x, y and z are declared so as to always return 0. fix this and you should be fine.

    Good luck

  • Developer

    Usually if setup get's stuck it means that you have some level of hardware failure. Have you checked that PCB is intact and no other visual sings of damage? Also if you have good soldering / reflow stations you could give heat a bit for gyro / adc chips.

    Btw which flight electronics you are using? AMP1x or APM2x ?

  • when i try to compile AP_ADC_test.pde i get the following error:

    AP_ADC_test.cpp: In function 'void show_data()':
    AP_ADC_test.pde:-1: error: no matching function for call to 'AP_ADC_ADS7844::Ch6(const uint8_t [6], uint16_t [6])'

    anyone else get that?

This reply was deleted.

Activity