IMU not initializing using Arduino IDE

Hello everyone,

 

I hope someone can help me with this issue as I would like to customize some of the code using the Arduino IDE.

 

I own 2 APMs with OilPan revision H IMUs.  Both units work fine when loading the latest code using the APM Planner.  However whenever I try loading ArduPilot Mega 2.21 using the Arduino IDE I run into problems on both APMs.

The code compiles and loads fine, however, the IMU no longer calibrates itself.  I no longer get the A & C lights flashing back and forth.  Instead, after about 30 seconds, the B light goes on solid.  Furthermore the APM will no longer communicate with APM Planner under the Flight Data tab.  I've included a picture of the error message. 

When using the Terminal tab and the CLI switch in Flight position I now get an error message instead of seeing the IMU initialize (see picture).  However the CLI and the menus work fine when the switch is on position 0.

 

Now, I believe I RTFM, so slap me across the head if I've missed something!

 

Thanks for the help.

ScreenShot150.bmp

ScreenShot149.bmp

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

Join diydrones

Email me when people reply –

Replies

  • Hi Chriss,

     

    Thanks for the quick reply.  That was the ticket!  I commented out the 3 HIL lines and it works fine now. 

     

    To answer your question, I'm working on a topo mapping drone and I've had to add a few lines of code to access some of the available pins.  Basically I've added Alpo's camera stabilization code, as well as my own, to control and trigger the camera based on ground speed.

    Otherwise I completely agree with you.  The APM Planner rocks!  And if there is a way for me to do this using the APM planner, please let me know.

     

    Thanks for all the great work.

  • 3D Robotics

    I think you may be loading the code in HIL (flight sim) mode. Check the APM_config.h file and make sure the HIL lines are commented out. I've uploaded a new zip file that has them commented out by default.

     

    Out of curiosity, why are you using Arduino to load the code? We're tried hard to make that unnecessary (for exactly this reason--it's too hard to support).

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…