🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    [Solved] IMU - MPU9250

    Scheduled Pinned Locked Moved Arduino
    4 Posts 2 Posters 8.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F Offline
      F3l1x
      last edited by F3l1x

      Hi
      I've tried to use the accelerometer in arduino IDE with a Fire stack
      I did try the examples at MakerFactory and it works for the AK8963 chip (IMU.initAK8963(IMU.magCalibration);
      Unfortunately IMU.calibrateMPU9250(IMU.gyroBias, IMU.accelBias); does not work, nor does readGyroData or readAccelData. It does not print anything, screen flashes and Fire keeps rebooting for ever, so I can't use accelerometer/gyro
      The hardware is ok as I could use it with UIFlow
      I tried the WHO_I_AM thing and it says MPU9250: I am 19 / I should be 71
      Could it be the problem ?
      When I comment out IMU.calibrateMPU9250(IMU.gyroBias, IMU.accelBias), no more reboot - but of course it only shows 0s, so it's not very useful

      1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue
        last edited by

        Hello @F3l1x

        AFAIK MPU6886 reports 0x19 as WHO_AM_I. I think you already might have a newer M5Stack Fire which uses an MPU6886 - please see version history here:

        https://docs.m5stack.com/#/en/core/fire?id=version-change

        Have you tried below code? Looks like it can deal with all IMUs ever used in stacks.

        https://github.com/m5stack/M5Stack/blob/master/examples/Basics/IMU/IMU.ino

        Good luck!

        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • F Offline
          F3l1x
          last edited by

          Thanks so much, Felix !

          1 Reply Last reply Reply Quote 0
          • felmueF Offline
            felmue
            last edited by

            Hi @F3l1x

            you are very welcome.

            Happy Stacking!
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post