Chandru Posted October 8, 2013 Report Share Posted October 8, 2013 I am trying to access the wia register of magnetometer by passing 0x0c as address,I just get FF as the result instead of 48H.when i pass 0x68 as address,i get 0x87 as the value for wia register.I should get 48h.Kindly let me know what the problem could be Quote Link to comment Share on other sites More sharing options...
Jeff Rowberg Posted October 9, 2013 Report Share Posted October 9, 2013 Hi Chandru, Have you tried alternative addresses for the AK8975 slave, such as 0x0D or 0x0E? Also, have you enabled I2C slave bypass mode on the MPU9150? The AK8975 inside the MPU is wired up to the AUX I2C pins rather than the main I2C pins, so you will not be able to talk directly to the magnetometer without first enabling bypass. I have not yet worked with the MPU9150 much yet, so I am kind of guessing here. Quote Link to comment Share on other sites More sharing options...
Chandru Posted October 9, 2013 Author Report Share Posted October 9, 2013 Hi Jeff, Thank you for your comments.I had set the Bypass enable and i am able to read the wia register as 48H.i am a newbie.I am also getting the x,y,z readings in hex format for the magnetometer.Kindly let me know how am i suppose to calculate which way is North with the three 16 bits register values-X_mag,Y_mag and Z_mag. Thank you once again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.