I am new to the XIAO line. I’m trying to feel around by hacking together some existing code. (Big thanks to those who post complete solutions here! @chuck)
At the moment, I’m trying to wake the Sense using the step sensor. I’ve started with the Pedometer example. I do get interrupts occasionally now but they seem only loosely correlated with the steps.
My current initialization code is below. I welcome suggestions.
IMU.writeRegister(LSM6DS3_ACC_GYRO_CTRL1_XL, LSM6DS3_ACC_GYRO_FS_XL_2g | LSM6DS3_ACC_GYRO_ODR_XL_26Hz); //IMU.writeRegister(LSM6DS3_ACC_GYRO_CTRL10_C, 0x3C); IMU.writeRegister(LSM6DS3_ACC_GYRO_CTRL10_C, 0x3E); //IMU.writeRegister(LSM6DS3_ACC_GYRO_TAP_CFG1, 0x40); IMU.writeRegister(LSM6DS3_ACC_GYRO_TAP_CFG1, 0x8E); IMU.writeRegister(LSM6DS3_ACC_GYRO_INT1_CTRL, 0x10); IMU.writeRegister(LSM6DS3_ACC_GYRO_INT_DUR2, 0x7F); IMU.writeRegister(LSM6DS3_ACC_GYRO_WAKE_UP_THS, 0x80); IMU.writeRegister(LSM6DS3_ACC_GYRO_MD1_CFG, 0x08);