SparkFun_MPU-9250-DMP_Arduino_Library
SparkFun_MPU-9250-DMP_Arduino_Library copied to clipboard
Unsufficient I2C baud-rate
The baud-rate between the MPU9250 and the microcontroller is not specified explicitly. When trying to sample the DMP at 200 Hz, this caused some drops in the gyroscope readings, which in turn also affected the angle computation. And therefore my balancing controller was unstable
Adding the line:
Wire.setClock(400000);
after Wire.begin();
in the inv_error_t MPU9250_DMP::begin(void)
function resolved all issues.
this also helps to sample at higher rate like 1000Hz @hbob thank you