Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AtomS3R IMU #129

Open
patfelst opened this issue Oct 10, 2024 · 6 comments
Open

AtomS3R IMU #129

patfelst opened this issue Oct 10, 2024 · 6 comments

Comments

@patfelst
Copy link

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!

@patfelst
Copy link
Author

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

@lovyan03
Copy link
Collaborator

Hello, @patfelst
Sorry, the current release version doesn't work properly.
Please try the develop branch version.

@patfelst
Copy link
Author

geat thank you, it's working now!

@patfelst patfelst reopened this Oct 11, 2024
@patfelst
Copy link
Author

patfelst commented Oct 12, 2024

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?

@lovyan03
Copy link
Collaborator

lovyan03 commented Nov 5, 2024

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);

@patfelst
Copy link
Author

patfelst commented Nov 8, 2024

I will test this very soon, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants