Page 1 of 1

5DOF IMU ROLL Wrong way Pitch OK !!!

Posted: Tue Feb 08, 2011 10:08 am
by Ebi
Hi everyone,

Just finished assambling my Mega board with WMP Original and 5DOF IMU from Sparkfun.

I have one problem the ROLL Axis goes the wrong way on the IMU. The PITCH axis is right.

If I roll to the right in stabilized mode the left motor will increase speed :?

What should I change in the code ????

Thank you for you Help,

Joined a photo of my Home made shield.

5DOF IMU + WMP Original-900.jpg
(224.11 KiB) Downloaded 29 times

Re: 5DOF IMU ROLL Wrong way Pitch OK !!!

Posted: Tue Feb 08, 2011 10:47 am
by Ebi
Ok, don't know much about programming Arduino but found the answer.

Alex souldn't you change this on the next v1.7 too ? My 5DOF IMU is mounted like on the aeroquad shield.

changed ligne 910 on v1.6

FROM

accADC[ROLL] = accADC[ROLL] - accZero[ROLL] ;

TO

accADC[ROLL] = - (accADC[ROLL] - accZero[ROLL]) ;


How to connect 5DOF IMU on you Arduino Board

X (5DOF IMU) is connected to A2 (on Arduino)
Y (5DOF IMU) is connected to A1 (on Arduino)
Z (5DOF IMU) is connected to A3 (on Arduino)


Now everything perfect will go for a test flight ;)