I have difficulties with MPU9250 sensors
When using the library can not use the sensor.
Error initializing communication with IMU
When using this library, I also get an error, and in addition also an error code
MPU connection failed. Please check your connection with `connection_check` example.
I2C ERROR CODE : 3
MPU connection failed. Please check your connection with `connection_check` example.
What kind of error code 3 is it, only in your library I encountered this.
I have been using the I2C bus for many years, and I see this for the first time.
But, this example works fine, although when compiling it warns that the code was written for the SAMD platform.
The signal analyzer shows that the MPU9250 responds to the request 0x75 with 0x70, although it should respond with 0x71.
Fake, fake chip, non-working chip?
But why then does the example from SparFan work so well?
I check the presence of the module on the bus I2C using the code:
#include <Wire.h>
//UART1 TX - PA9, RX - PA10
#define SerialOne Serial1
void setup(){
Wire.begin();
SerialOne.begin(115200);
while (!SerialOne);
SerialOne.println("\nI2C Scanner");
}
void loop(){
byte error, address;
int nDevices;
SerialOne.println("Scanning...");
nDevices = 0;
for(address = 8; address < 127; address++ ){
Wire.beginTransmission(address);
SerialOne.print(address,HEX);
SerialOne.println("+");
error = Wire.endTransmission();
if (error == 0){
SerialOne.print("I2C device found at address 0x");
if (address<16)
SerialOne.print("0");
SerialOne.print(address,HEX);
SerialOne.println(" !");
nDevices++;
}
else if (error==4) {
SerialOne.print("Unknow error at address 0x");
if (address<16)
SerialOne.print("0");
SerialOne.println(address,HEX);
}
}
if (nDevices == 0)
SerialOne.println("No I2C devices found\n");
else
SerialOne.println("done\n");
delay(1000);
}
I receive an address
I2C device found at address 0x68 !
or
I2C device found at address 0x69 !
Depending on whether AD0 is connected to ground or to 3.3 volt.
I have difficulties with
MPU9250
sensors When using the library can not use the sensor.Error initializing communication with IMU
When using this library, I also get an error, and in addition also an error codeWhat kind of
error code 3
is it, only in your library I encountered this. I have been using theI2C
bus for many years, and I see this for the first time. But, this example works fine, although when compiling it warns that the code was written for the SAMD platform. The signal analyzer shows that theMPU9250
responds to the request0x75
with0x70
, although it should respond with0x71
. Fake, fake chip, non-working chip? But why then does the example fromSparFan
work so well? I check the presence of the module on the busI2C
using the code:I receive an address
I2C device found at address 0x68 !
orI2C device found at address 0x69 !
Depending on whetherAD0
is connected to ground or to 3.3 volt.