Compass and calibration
-
Hello,
I've recently received the m5stack "limited" with battery and mpu9250.
I want to use mpu9250 to get heading (0 to 360 degres from earth north).I've run the sample code "MPU9250BasicAHRS.ino" without much problems, but values are very stranges.
If my understanding is good, the yaw is the heading. Pitch and roll seem ok but only if I start the m5stack on a plate surface. So I think there is a calibration problem somewhere.
This sample seem to be based on https://github.com/kriswiner/MPU9250/blob/master/MPU9250BasicAHRS.ino (and the lib too). I think base the lib on the t3 version will be better, but it have to work with the standard version.Do you think what is wrong ? Is it possible to calibrate better and to save the calibration ? (or have I a bad interpretation of Yaw ?).
Thanks !
-
Hello,
Moreover, i'm not sure but I think magnets on the m5stack with mpu9250 is a bad idea (i've removed the ones in my board). So i still not resolved my problem :/
-
@quetzal
Hi, there has been some discussion of this here: https://github.com/m5stack/M5Stack/issues/39 -
@quetzal Hi Quetzal,
Below is a link to a high quality article discussing exactly how to calibrate a magnetometer and how this can be applied to the M5Stack to get accurate readings from the mpu9250.
-
Hello JimiT,
I will see if it can solve my problem, thanks for your help ! I will follow the github issue.
Thanks