Jump to content
I2Cdevlib Forums

PeteJ

Members
  • Posts

    1
  • Joined

  • Last visited

PeteJ's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I had one of my GY-521's that would always fail the testConnection() function and also would not calibrate. So before throwing it away I ran the getDeviceID() function and discovered that its ID was 0x39. On investigation in MPU6050.cpp, the return value is only true if the ID is 0x34, even further, the following functions (all of the offsets) only work with DeviceID's less than 0x38 !!! int16_t MPU6050::getXAccelOffset() { uint8_t SaveAddress = ((getDeviceID() < 0x38 )? MPU6050_RA_XA_OFFS_H:0x77); // MPU6050,MPU9150 Vs MPU6500,MPU9250 I2Cdev::readBytes(devAddr, SaveAddress, 2, buffer); return (((int16_t)buffer[0]) << 8) | buffer[1]; I changed my MPU6050.cpp values to suit my DeviceID to "getDeviceID() < 0x3A ", because mine was 0x39, it now works fine!!! Does anyone know what the range is? Thanks
×
×
  • Create New...