Im just working on a project where a robot is controlled by a magnetometer (mpu9250).
Maybe some readers already know me from this thread where i tried to get usable values
out of the raw values which are produces by the magnetometer:
Much thanks to the users who helped me with this problem.
But now im facing another problem:
When im measuring the values with an arduino, everything works fine.
But when i connect the mpu with the sensorshield which sits on the arduino,
the magnetometer starts to give weird values again. When i spin the robot (the magnetometer)
around, the values go to a certain values and then they decrease or increase again. They
dont reach 359 or 0 degress, they just jump from one to another values when i spin it.
When i hold it the values dont change so thats ok.
Another weird thing (Take this photo into account):
Here is the link to the photo:
You can see the mpu sits on a breadboard that i connected with the sensorshield.
So every time i move the breadboard(the mpu) towards or from the arduino with sensorshield away,
the values change. The values only show the yaw value so actually theyre not supposed to change.
Does this have to do with interferences? When i connect the mpu to a different seperate (from robot)
arduino, the effect doesnt occur.
I think i dont need to post code because the code is totally fine. As i already told this problem
does only occur when connected to the sensorshield on the robot.
Does somebody has an idea?