I'm using an MPU9250 that is calibrated. I am currently only caring about the Yaw value as it is attached to a car and therefore pitch and roll do not matter. Without the car, running it on a simple arduino uno and a breadboard with VCC GND SCL and SDA hooked up gives consistent results like the one shown below:
I'm pretty sure it is the magnets in the motor causing this interference. However, the nearby 6-pack of AA batteries or the upload cable it's attached to might also be the problem. Either way, how would I filter out this noise from the motor or the batteries or wherever it's coming from? I thought of aluminum foil but I want to see if software-wise I can fix it first.
P.S The library I'm using as well as my calibration process can be found here
and the library can be found here
The original post that led me here is this