MPU-9150 - 9 Degrees of Freedom Breakout board, Compass problem

Hello everyone

I have some small problem with the mpu 9150 compass,sow i wonder if someone here,know what is wrong.

I have try a new libraries and code for mpu 9150 into my sketch, but the last code and libraries was not stable at all, sow i will use the old one again.

Here is the problem:
Before I turn on the mpu 9150, i need to pointing mpu-9150 to the south about 200 degrees, to get right direction. after i do that and turn on the mpu-9150 the mpu-9150 is now working and show right direction. :slight_smile:

I have to do this,every time I shall start up mpu 9150 :0
It should not be like that. :0

Do someone now how i can remove - from mpu-9150 measurements.
I need to have like this,example 21 and not -21

Here is a video of the working mpu-9150,on the third line on the screen , is mpu-9150 X-Y-Z
On the compass i have add.North,South,West,East(on Norwegian)
I have made some custom symbol for ROLL,PITCH.

Arrow up with F and degrees,mean Front is 20 degrees up.
Arrow down with F and degrees,mean Front is 20 degrees down.
Arrow down with V and degrees, mean left side is 20 degrees down.
Arrow down with H and degrees, mean right side is 20 degrees down..

I have also a topic on the Gigs and Collaborations (Pay job/MPU-9150 compass/problem)

The code is not write by me,but something is.

Here is all libraries For sketch and MPU-9150 i use now,i have only Modified the MPU9150 CPP file,to work with OSD Max7456.
see attachment.

libraries For Bottonside_Code_Version_24_En.rar (320 KB)

Bottonside_Code_Version_24_En.ino (27.3 KB)

You must calibrate the compass to remove offset and gain errors. Here are two procedures (the best one is last):

I think I know what's wrong, with the MPU-9150.

In the code,i have use: MPU.printAngles(MPU.m_dmpEulerPose);
If you use that, the mpu-9150 use not the magnetic field around me.

If i use the MPU.printAngles(MPU.m_fusedEulerPose); the mpu-9150 use the magnetic field around me. but the measurements are not correct.

Sow i need to add Callibration and 360 degrees to the compass in the mpu-9150 sketch.

if someone are interested to help me,look at the topic on the Gigs and Collaborations (Pay job/MPU-9150 compass/problem)