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

    [Solved]Doesn't work sample sketch "MP9250BasicAHRS" on M5Stack Gray

    M5Stack Fire
    6
    11
    29.4k
    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.
    • T
      tmarujumpoff
      last edited by m5-docs

      Hi,

      I bought M5Stack Gray for motion sencing of wheelchair.

      I installed M5Stack library and sketched on my Mac and basic sketch worked fine.
      Also I tried to install sample sketch "MP9250BasicAHRS", but it didn't.

      • comple and download into M5Stack was work fine
      • Then I checked behavior of M5Stack via Serial Monitor and following message was displayed.

      MPU9250 I AM 0 I should be 71
      MPU9250 is online...
      x-axis self test: acceleration trim within : 2.2% of factory value
      y-axis self test: acceleration trim within : 8.4% of factory value
      z-axis self test: acceleration trim within : 1.6% of factory value
      x-axis self test: gyration trim within : -0.0% of factory value
      y-axis self test: gyration trim within : 0.0% of factory value
      z-axis self test: gyration trim within : 0.8% of factory value
      Guru Meditation Error: Core 1 panic'ed (IntegerDivideByZero). Exception was unhandled.
      Core 1 register dump:
      PC : 0x400d3ba5 PS : 0x00060730 A0 : 0x800d1412 A1 : 0x3ffb1f20
      A2 : 0x3ffc2494 A3 : 0x3ffc2520 A4 : 0x3ffc252c A5 : 0x3ffb1f50
      A6 : 0x00000000 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x00000000
      A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000002 A13 : 0x00000002
      A14 : 0x3ffb1f50 A15 : 0x00000000 SAR : 0x0000001c EXCCAUSE: 0x00000006
      EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000

      It look like that MPU9250 didn't calibrate.
      Is this following line correct?

      // Calibrate gyro and accelerometers, load biases in bias registers
      IMU.calibrateMPU9250(IMU.gyroBias, IMU.accelBias);

      I've no idea to fix this problem and will you help or give advises?

      Thank you,

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User
        last edited by

        I have the same problem, I just bought and received a gray model that said it has the MPU9250, but
        I can't seem to get it to work. My error is almost the same, the calibration numbers are a little different, otherwise same error.
        Someone please tell us how to fix this.
        I'm on a Linux Mint box (19.0, 64bit, 4gb ram, Arduino 1.8.5 IDE) Updated ESP32 cores, etc.
        I've tried all the versions of the M5Stack library that are available via the library manager, all give the same error.

        1 Reply Last reply Reply Quote 0
        • 0x1abin0
          0x1abin
          last edited by 0x1abin

          The latest arduino-esp32 I2C have a problem, I checkout out to the e63aa4065092c9a3a0547b2649a509585866ce87 can fix the problem.

          cd ~/Documents/Arduino/hardware/espressif/esp32
          git checkout e63aa4065092c9a3a0547b2649a509585866ce87
          
          ? C 2 Replies Last reply Reply Quote 1
          • ?
            A Former User @0x1abin
            last edited by

            @bin That worked, thank you.

            1 Reply Last reply Reply Quote 0
            • T
              tmarujumpoff
              last edited by

              Hi all,

              Thank you for your comments and advise.

              My M5Stack work fine too after update library by 0x1abin's advise.

              1 Reply Last reply Reply Quote 0
              • tiryohT
                tiryoh
                last edited by

                HI, I faced the same problem, but it seems to be fixed on this commit for now.
                https://github.com/espressif/arduino-esp32/commit/b05430cfd9f273d627baa6c4dac6c215d6cde902

                1 Reply Last reply Reply Quote 0
                • C
                  clause4 @0x1abin
                  last edited by

                  @0x1abin Hi, please can you explain to me how this fixed the issue. I am struggling with the same thing. I am very new to this. I have followed all the instructions but i dont know how to upload the other I2c onto the m5stack.
                  I'm sure I'm missing something...

                  m5-docsM 1 Reply Last reply Reply Quote 0
                  • m5-docsM
                    m5-docs @clause4
                    last edited by

                    @clause4
                    Hi, What's your specific proble/issue?

                    M5Stack documentation URL

                    https://docs.m5stack.com

                    C 1 Reply Last reply Reply Quote 0
                    • C
                      clause4 @m5-docs
                      last edited by

                      @watson Thank you replying.
                      I' m not sure how to update the library.
                      I need to use the MPU9250 to monitor a pumps vibrations.

                      m5-docsM 2 Replies Last reply Reply Quote 0
                      • m5-docsM
                        m5-docs @clause4
                        last edited by

                        @clause4
                        Hi, you can update your other libraries through arduino ide by following this article.

                        https://docs.m5stack.com/#/en/related_documents/upgrade_m5stack_lib

                        M5Stack documentation URL

                        https://docs.m5stack.com

                        1 Reply Last reply Reply Quote 1
                        • m5-docsM
                          m5-docs @clause4
                          last edited by

                          @clause4

                          You need click "Library Manager" on Arduino IDE

                          M5Stack documentation URL

                          https://docs.m5stack.com

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post