M5Unified
M5Unified copied to clipboard
AtomS3R IMU
Hi there, I tried the IMU example on a AtomS3R but it says the IMU is not found.
Are there any plans to update the library to work with the AtomS3R's BMM150 geomagnetic sensor and BMI270 attitude sensor?
Thankyou!
Apologies I see release 0.1.17 has added support for AtomS3R.
Can you think of a reason that the IMU init retuns as imu_none? I am running this example https://github.com/m5stack/M5Unified/blob/master/examples/Basic/Imu/Imu.ino
Hello, @patfelst Sorry, the current release version doesn't work properly. Please try the develop branch version.
geat thank you, it's working now!
Hi again, I got the Madgwick library to calculate roll, pitch and yaw (heading).
I notice that the heading rotation is reversed to what I exptected, i.e. turning the AtomS3R clockwise (screen facing up) results in heading angle reducing. Can one of the following functions be used to reverse that behaviour? i.e. Clockwise rotation increases heading?
// 軸の順序を右手系で指定する。最初の2軸のみ指定し、3軸目は省略
bool setAxisOrderRightHanded(axis_t axis0, axis_t axis1);
// 軸の順序を左手系で指定する。最初の2軸のみ指定し、3軸目は省略
bool setAxisOrderLeftHanded(axis_t axis0, axis_t axis1);
I'm not sure how to call this from the arduino setup() function. Can you please help?
Sorry for the late reply.
Thank you for providing important information. I overlooked that the orientation of the IMU of the AtomS3R series is different from the conventional model. I have updated the develop branch now and changed the axis orientation. If you want to try it immediately, please use the latest develop branch for both M5GFX and M5Unified.
Also, if you want to call the axis setting function, do it as follows.
M5.Imu.setAxisOrderLeftHanded(m5::IMU_Class::axis_t::axis_x_pos, m5::IMU_Class::axis_t::axis_y_pos);
I will test this very soon, thank you
hi again apologies for the long delay.
Is the new AtomS3R orientation code now in the latest release v0.2.2? The orentation seems the same to me.
If I use the function below, the orientation is correct (i.e. heading increases when AtomS3R is turned clockwise).
M5.Imu.setAxisOrderLeftHanded(m5::IMU_Class::axis_t::axis_x_pos, m5::IMU_Class::axis_t::axis_y_pos);
I think we can probably close this issue now.
In the currently released version, the IMU orientation of AtomS3 and AtomS3R has been adjusted to be the same. As far as I understand, there are no compatibility issues at this stage. If you are having any issues, please let me know the details.
I'm no longer working on this project. But like I saide the function setAxisOrderLeftHanded worked for me.