You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Enable accel and gyro sensors through PWR_MGMT_2
317
317
// Enable Accelerometer (all axes) and Gyroscope (all axes) by writing zero to PWR_MGMT_2
318
318
result = setBank(0); if (result > worstResult) worstResult = result; // Select Bank 0
319
-
uint8_t pwrMgmt2 = 0x40; // Set the reserved bit 6
319
+
uint8_t pwrMgmt2 = 0x40; // Set the reserved bit 6 (pressure sensor disable?)
320
320
result = write(AGB0_REG_PWR_MGMT_2, &pwrMgmt2, 1); if (result > worstResult) worstResult = result; // Write one byte to the PWR_MGMT_2 register
321
321
322
-
// Configure I2C_Master/Gyro/Accel in Low Power Mode (cycled) with LP_CONFIG
323
-
result = setSampleMode((ICM_20948_Internal_Mst | ICM_20948_Internal_Acc | ICM_20948_Internal_Gyr), ICM_20948_Sample_Mode_Cycled); if (result > worstResult) worstResult = result;
322
+
// Place _only_ I2C_Master in Low Power Mode (cycled) via LP_CONFIG
323
+
// The InvenSense Nucleo example initially puts the accel and gyro into low power mode too, but then later updates LP_CONFIG so only the I2C_Master is in Low Power Mode
324
+
result = setSampleMode(ICM_20948_Internal_Mst, ICM_20948_Sample_Mode_Cycled); if (result > worstResult) worstResult = result;
324
325
325
326
// Disable the FIFO
326
327
result = enableFIFO(false); if (result > worstResult) worstResult = result;
sentence=Use the low-power high-resolution ICM 20948 9 DoF IMU from Invensense with I2C or SPI. Version 1.2 of the library includes support for the InvenSense Digital Motion Processor (DMP™).
uint8_t pwrMgmt2 = 0x40; // Set the reserved bit 6 (pressure sensor disable?)
1216
1216
result = write(AGB0_REG_PWR_MGMT_2, &pwrMgmt2, 1); if (result > worstResult) worstResult = result; // Write one byte to the PWR_MGMT_2 register
1217
1217
1218
-
// Configure I2C_Master/Gyro/Accel in Low Power Mode (cycled) with LP_CONFIG
1219
-
result = setSampleMode((ICM_20948_Internal_Mst | ICM_20948_Internal_Acc | ICM_20948_Internal_Gyr), ICM_20948_Sample_Mode_Cycled); if (result > worstResult) worstResult = result;
1218
+
// Place _only_ I2C_Master in Low Power Mode (cycled) via LP_CONFIG
1219
+
// The InvenSense Nucleo example initially puts the accel and gyro into low power mode too, but then later updates LP_CONFIG so only the I2C_Master is in Low Power Mode
1220
+
result = setSampleMode(ICM_20948_Internal_Mst, ICM_20948_Sample_Mode_Cycled); if (result > worstResult) worstResult = result;
1220
1221
1221
1222
// Disable the FIFO
1222
1223
result = enableFIFO(false); if (result > worstResult) worstResult = result;
0 commit comments