Trying to adapt Jean-Louis' tricopter code to IMU V3

'm having some trouble adapting the new IMU v3 to Jean-Louis' code written for tricopters.  His code used the APM_Compass library and for some reason, it wont compile with any reference to that library.  The new IMU doesnt use that library, so I havent let that stop me from trying.  It compiles and gives me output, but something is still wrong.  The debug wont print GPS and the attitude values although stable seem way off.  I'm hoping some experts can look at my code and tell me what's wrong or even what is right.

I've included the code I have now.  Please help if you can.ardimupter-120708b.zip

3690945916?profile=original

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

Join diydrones

Email me when people reply –

Replies

  • This reply was deleted.
    • Jeff, I hope youre out there.  I got this working on a $15.00 board running FreeIMU for attitude and Jean Louis' Ardimupter code.  It's running at 100Hz. 

      • This reply was deleted.
        • Glad to hear it Jeff.  I know your projects are heavy duty.

          I put the props on and tried it and was disappointed again.  Something must be backwards because it kept trying to flip and finally broke something.  I'll try it again. 

  • I dont know what to try now.  It seems like the PID is what needs tweaking.  I give it throttle and it gets wobbly like the throttle changes are too slow or too big, not sure which or how to proceed.

  • Hey Harry, The "embedded stuff" is no mystery. Its all in the data sheet and the compiler knows the names of all the registers. Well actually the compiler knows what chip you have, cause you have to tell it. When it sees the exact name of a register (from the documentation) it knows what the memory address of that register. Just use the names from the data sheet. It's a pdf file, save it and learn, you will be embedded in the chips inner workings ; )  It's not hard, really.

  • The latest version of code I'm working with.

    AutoStab_IMUV32-120728a.zip

    https://storage.ning.com/topology/rest/1.0/file/get/3690950717?profile=original
  • Good job on that wiring!  It took me a few hours to solder the encoder.  The parts are the size of a grain of rice.  My Tx is a converted JR 6102 using the FrSky DIY module.  I set up the encoder for 6 channels while the Rx is 7 channels and that confused me for a while when I wasnt getting anything from the IMU.  It seems the IMU needs to be set to read 7 max from a 6 channel encoder.

    I hear what youre saying about the 120 degrees mixing for a tricopter being similar to a heli.  One big difference with arducopter is the use of classes.  Classes probably make it easier to customize things, but not so easy for me.  Yet. :)  

This reply was deleted.

Activity

Jose Araujo liked Jose Araujo's profile
Aug 29
spencer harvey liked spencer harvey's profile
Jul 9
More…