Im trying to read hmc5883l measurements through mpu-6050. My mpu-6050 chip is on GY-521 board and hmc5883l is on GY-271 board. I connected magnetometer SDA and SCL lines to the GY-521 XDA and XCL lines. Im using the FreeIMU library. When i upload the FreeIMU_RAW example sketch and open the Serial Monitor I’m getting good values from gyro and accel but the 7th,8th,9th rows which are magnetometer readings don’t change. Do you have any idea what I am doing wrong?
Why do you use the XDA and XCL lines ? They are ment for the internal 'dmp' inside the MPU-6050, so it can do calculations with the values of the magnetometer.
You may just as well use the normal SDA and SCL for the magnetometer.
And I think you have to enable a pass-through bit in the MPU-6050 to connect XDA to SDA and XCL to SCL.
How do you enable pass-through?