bolderflight / invensense-imu

Arduino and CMake library for communicating with the InvenSense MPU-6500, MPU-9250 and MPU-9255 nine-axis IMUs.
MIT License
497 stars 210 forks source link

Unable to reach magnetometer module in mpu9250 while using Teensy4.0 #106

Closed ozgur1akca closed 2 years ago

ozgur1akca commented 2 years ago

Hello everyone, I am using teensy 4.0 and i connected SCL pin to 19pin of teensy and SDA pin to 18pin of teensy. There is no problem with wiring and when i uses the Basic_I2C example it comes up with an error that says "Check IMU wiring or try cycling power Status: -5". However, when i use arduino uno instead of teensy4.0, there is nothing like that problem. Sensor works as expected. In addition, when i use connection check from another library, it says that : "Searching for i2c devices... Found 1 I2C devices I2C addresses are: 0x68 I2C address 0x68 is MPU6500 and ready to use AK8963 (Magnetometer) was not found." Can anyone help me?

flybrianfly commented 2 years ago

Try running the newest version of the library downloaded directly from GitHub. There were a bunch of fixes needed for the Teensy 4.x. It might also be the case that you don't actually have an MPU-9250 if the magnetometer is not found, in which case this library will not work.