Hello, I am trying to get the Yaw readings from 2 MPU9250s using this library ( GitHub - hideakitai/MPU9250: Arduino library for MPU9250 Nine-Axis (Gyro + Accelerometer + Compass) MEMS MotionTracking™ Device ). The problem I am getting is that when I added another MPU9250, the output becomes quite unpredictable. What I mean is, when I rotate one MPU, it seems to affect the values of the other even though it is stationary. And the values of the other MPU is also quite unresponsive and all in all, it is unpredictable and I cannot understand why. My codes for this is attached as a file…
Attempted solutions I tried was using another library from ( https://github.com/bolderflight/MPU9250.git ) however, when I try to change the xyz values to degrees using this formula, angles = atan2(IMU.getMagY_uT(), IMU.getMagX_uT()) *180 /3.14), derived from (Converting three axis magnetometer to Degrees - Arduino Stack Exchange) The results I got from testing just one MPU9250 were not exactly accurate and thus I did not move on to try it with 2 modules.
Another attempt was to try using another library from (GitHub - kriswiner/MPU9250: Arduino sketches for MPU9250 9DoF with AHRS sensor fusion) but I could not get it to work due to my inexperience.
Any help would be great! Thank you
DualMPU.ino (1.5 KB)