Code Monkey home page Code Monkey logo

Comments (5)

lc2047 avatar lc2047 commented on June 24, 2024

It seems the ESP32 has some issue with I2C clock frequency.
Wire.setClock(400000);
If reduce it to 100K, the code can go on.

But another issue happen.
Error initializing communication with IMU

from invensense-imu.

flybrianfly avatar flybrianfly commented on June 24, 2024

That's just the code's way of telling you that you aren't communicating with the sensor. The ESP32 core software used to have a problem with endTransmission(false) - I'm not sure if they've fixed it yet on their end, but you may need to update this library to use endTransmission() instead of endTransmission(false). Unfortunately, the sensor data sheet tells us to use that as part of the communication protocol, but it's up to the chip manufacturers to implement it correctly in their core software - this is just a work around that I know has helped people in the past.

It could also be an issue with your hardware setup, so I would run an I2C scanner example to check that you can see the sensor.

from invensense-imu.

lc2047 avatar lc2047 commented on June 24, 2024

Hi @flybrianfly

Thanks for your support.
The I2C speed issue still there(100kHz or slower).

However, the AK8963 function had new updates. I tried many codes and modified code for pass-through. ALL are not successful.
I remember somebody had a similar problem and fixed the issue with a sample. It became true in my case.
Why do a lot of problems at AK8963 only? I can't believe the reliability of TDK to such a level.

from invensense-imu.

ruairc-p avatar ruairc-p commented on June 24, 2024

Yeah Ic2047
You would think that someone selling a product would have an interest in making sure people could use it. Unless they had some anti-competitive, anti free-market reason for doing so.
Crazy World.

from invensense-imu.

flybrianfly avatar flybrianfly commented on June 24, 2024

@lc2047, I would try with a different microcontroller if you have one available - I don't have any issues with the Teensy and STM32 microcontrollers. I do think the I2C library is not as well implemented in the ESP32 core. Alternatively, you could try using SPI instead of I2C.

Finally, check that you got the MPU-9250 from a reputable source, there's a lot of fake ones out there.

from invensense-imu.

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.