jrowberg / i2cdevlib

I2C device library collection for AVR/Arduino or other C++-based MCUs
http://www.i2cdevlib.com
3.92k stars 7.52k forks source link

dmpGetMag returning zeros #137

Open marcbishara opened 9 years ago

marcbishara commented 9 years ago

using function: https://github.com/marcbishara/i2cdevlib/blob/master/Arduino/MPU6050/MPU6050_9Axis_MotionApps41.h#L753

Returns 0,0,0 Is that an outstanding issue or am I doing something wrong in setup?

Monax111 commented 8 years ago

I have the same problem!

Monax111 commented 8 years ago

I have the Arduino Nano, 2 MPU6050, 2 HMC5883L I want to get the output array with 20 values (the first board {3, 3, accelerometer, magnetometer 3, temperature}), the second board {3, 3, accelerometer, magnetometer 3, temperature}) Now I'm trying to make it work the first board (MPU6050+HMC5883L series connection). But i have the magnetometer (0.00,0.00,0.00); What do you think, what's the problem? my scheme

Recontech commented 8 years ago

Have you tried adding pull-up resistors?

On Sunday, 28 February 2016, Monax111 notifications@github.com wrote:

I have the Arduino Nano, 2 MPU6050, 2 HMC5883L I want to get the output array with 20 values (the first board {3, 3, accelerometer, magnetometer 3, temperature}), the second board {3, 3, accelerometer, magnetometer 3, temperature}) Now I'm trying to make it work the first board (MPU6050+HMC5883L series connection). But i have the magnetometer (0.00,0.00,0.00); What do you think, what's the problem? my scheme https://pp.vk.me/c630530/v630530113/1b27d/Q8F3Sna7UU8.jpg

— Reply to this email directly or view it on GitHub https://github.com/jrowberg/i2cdevlib/issues/137#issuecomment-189900495.

yang614 commented 8 years ago

The AK8975's address is 0x0C,but the code give the address is 0x0E, so change the address to 0x0C.