Giter Club home page Giter Club logo

Comments (11)

0x1abin avatar 0x1abin commented on September 27, 2024

It is best to calibrate the magnetometer on startup, and the magnets in the bottom will interfere with it.

from m5stack.

tuupola avatar tuupola commented on September 27, 2024

My guess is you are converting the the high and low bytes as small endian. 6050 / 9250 is big endian.

from m5stack.

dsprogis avatar dsprogis commented on September 27, 2024

from m5stack.

ismailErolAcOCrW avatar ismailErolAcOCrW commented on September 27, 2024

Hi my friends.
can anybody explane me, why MPU9250 generate different values after every RESET?
i use a basic example for MPU9250 with no changes, and my M5Stack with built-in MPU9250.
friends. my mpu9250 gyroscope sensor is constantly restarting M5 stackable .

from m5stack.

ismailErolAcOCrW avatar ismailErolAcOCrW commented on September 27, 2024

Hi Sterpa ,
did you solve this problem ?
Still I have problem with my M5 stack

from m5stack.

quetzal avatar quetzal commented on September 27, 2024

Hello,

I've the same issue. Someone on m5stack forum pointed me this issue and this article to calibrate it: https://appelsiini.net/2018/calibrate-magnetometer/
I will see if it solve the problem.

from m5stack.

izanette avatar izanette commented on September 27, 2024

Any updates on this issue? Has anyone tried to port the https://github.com/kriswiner/MPU9250/blob/master/MPU9250_MS5637_AHRS_t3.ino to the M5Stack?

from m5stack.

ifrew avatar ifrew commented on September 27, 2024

Hi Folks, finally figured it out. I have been using the mpu9250 on esp32 for a while now and just started using the m5stack.

The sample mpu9250.cpp driver in the stack is not resetting the mpu9250 device during startup. The modification is to the mpu9250.cpp file as follows.

In the init routine change the value 0x00 to 0x80. This will reset the device to a set of know defaults at startup.

void MPU9250::initMPU9250() { // wake up device writeByte(MPU9250_ADDRESS, PWR_MGMT_1, 0x00); // Clear sleep mode bit (6), enable all sensors delay(100); // Wait for all registers to reset

to

void MPU9250::initMPU9250() { // wake up device writeByte(MPU9250_ADDRESS, PWR_MGMT_1, 0x80); // Clear sleep mode bit (6), enable all sensors delay(100); // Wait for all registers to reset

from m5stack.

ifrew avatar ifrew commented on September 27, 2024

Hmm may have spoke too soon. The calibration routine resets the device, so an Init followed by a calibration followed by an Init should work..but it is giving inconsistent values back.. hmm Referencing the issue on the developers repository kriswiner/MPU9250#232

from m5stack.

sukeshak avatar sukeshak commented on September 27, 2024

wp_20180603_00_28_56_pro_li
I am having same issues. Testing now with processing script to figure out.
Guess GPS or the magnet on base is causing interference.

from m5stack.

Zontex avatar Zontex commented on September 27, 2024

Hello, tested the following code: https://github.com/m5stack/M5Stack/blob/master/examples/Basics/IMU/IMU.ino
Seems like there isn't any problems, it probably was a software issue that got fixed. make sure you have the latest M5Stack library version before testing it, regarding roll pitch and yaw, it takes time to stabilise so eventually after few seconds it will go back to the position as before the reset, it might require calibration. closing for now.

from m5stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.