I am trying to change the accelerometer range to 8g on my Arduino/AltiMU-10 v5 project:


imu.writeReg(LSM6::CTRL1_XL, 0x83);

correct for this?

Many thanks,

P Wild


It looks like you are planning to set the wrong bits in that register. Writing 0b10000011 (0x83) to CTRL1_XL would set the BW_XL1 and BW_XL0 bits to 1. To get +/-8 g full scale, you should instead set both the FS_XL1 and FSXL0 bits to 1. You can learn more about the control register bit parameters under the “Register description” section of the LSM6DS33 datasheet, which can be found under the “Resources” tab of the AltIMU-10’s product page.

So, your code should be:

imu.writeReg(LSM6::CTRL1_XL, 0x8C);  // 0b10001100 ODR = 1000 (1.66 kHz (high performance)); FS_XL = 11 (+/-8 g full scale)


Many thanks - I’ll give it a try!