Spitfire1.2 Posted July 12, 2016 Report Share Posted July 12, 2016 Hi everyone! I am making a 3 axis camera gimbal for my bachelor thesis, and I'm using an Avr(Atmega32) with two MPU-9150 modules. I get correct values from the accelerometer and gyro, but I am facing problems with the compass. I switch the mpu to pass-through mode by writing "1" to I2C_BYPASS_EN bit on the INT_PIN_CFG register(55 dec). I disable "master-mode" by writing "0" to I2C_MST_EN pin on the USER_CTRL register(106 dec). I read the Device ID address(0x00) of the compass and I get "48H" which is correct. I set the magnetometer to "single measurement mode" and I start polling the ST_1 register(0x02h), when the DATA_READY bit is "1", I start reading the measurement data. The problem is that the data ready bit never turns to "1" and If I start reading the magnetometer data without polling the ST_1 reg, all I get is "0" for each axis. I also tried switching the ak8975 to "fuse mode" in order to write into a ASA register a random number so I can read it later, but I still got "0". Any Ideas? thanks for reading!(and sorry for my bad English....). Quote Link to comment Share on other sites More sharing options...
singh85 Posted December 5, 2017 Report Share Posted December 5, 2017 Were you able to resolve this. We are facing same issue with magnetometer. 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.