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

This forum is dedicated to all issues and questions related to your individual setups and configurations
Post Reply
matt_prox
Posts: 18
Joined: Tue Sep 01, 2015 2:16 pm

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

Post 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
Last edited by matt_prox on Tue Oct 06, 2015 4:27 pm, edited 1 time in total.

Kbev5709
Posts: 451
Joined: Mon Aug 17, 2015 5:56 pm

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

Post 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.

matt_prox
Posts: 18
Joined: Tue Sep 01, 2015 2:16 pm

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

Post 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.

matt_prox
Posts: 18
Joined: Tue Sep 01, 2015 2:16 pm

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

Post 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

Post Reply