Page 1 of 1

Bug in MW2.4 when using magnetometer on GY-88 IMU board

Posted: Tue Oct 06, 2015 3:28 pm
by matt_prox
Hi all,

I recently upgraded my quad to use MW2.4. Initially my compass would not work (and consequently the navigation functions too), until I commented out the following line in def.h:

Code: Select all

#define MPU6050_I2C_AUX_MASTER // MAG connected to the AUX I2C bus of MPU6050


Apparently, the magnetometer is on the regular I2C bus, and not attached to the auxiliary input on the MPU6050 as assumed in the code. This is confirmed when using the Arduino I2C scanner sketch from the Ardino Playground.

Matt

Re: Bug in MW2.4 when using magnetometer on GY-88 IMU board

Posted: Tue Oct 06, 2015 3:53 pm
by Kbev5709
The kind of behavior you describe can sometimes come from having the wrong board selected in the config.h file under boards and sensor definitions or if a sensor is enabled in the independent sensors section when using an AIO board. Something I would double check. Just my 2 cents worth on what might cause this.

Re: Bug in MW2.4 when using magnetometer on GY-88 IMU board

Posted: Tue Oct 06, 2015 4:30 pm
by matt_prox
The board is definitely correct, and is configured correctly in config.h, and also in def.h (except for the error above). I've double- and triple-checked.

Re: Bug in MW2.4 when using magnetometer on GY-88 IMU board

Posted: Tue Oct 06, 2015 10:29 pm
by matt_prox
Also, a quick google search shows that the HMC5883L magnetometer is connected to the i2c bus, not the aux connection on the MPU6050. So the line being included in MW2.4 is definitely a bug.

http://www.haoyuelectronics.com/Attachm ... 88.SCH.jpg