i2cdevlib
i2cdevlib copied to clipboard
MPU6050/MPU6050.cpp initialize() should call setSleepEnabled first, not last
The current code, setClockSource(MPU6050_CLOCK_PLL_XGYRO); setFullScaleGyroRange(MPU6050_GYRO_FS_250); setFullScaleAccelRange(MPU6050_ACCEL_FS_2); setSleepEnabled(false); // thanks to Jack Elston for pointing this one out! should be setSleepEnabled(false); // thanks to Jack Elston for pointing this one out! setClockSource(MPU6050_CLOCK_PLL_XGYRO); setFullScaleGyroRange(MPU6050_GYRO_FS_250); setFullScaleAccelRange(MPU6050_ACCEL_FS_2); I find that setClockSource etc. are not executed if the device is still asleep.
Had some similar issues writing motion detection thresholds, had to make sure to wake the device before the values sticked.