DavidEGrayson / minimu9-ahrs

Program for reading data from the Pololu MinIMU-9 over I²C. Works on the Raspberry Pi and other embedded ARM Linux boards.
Other
167 stars 68 forks source link

Incorrect configuration of LSM303_CTRL_REG4_A #3

Closed DavidEGrayson closed 11 years ago

DavidEGrayson commented 11 years ago

I am stupidly settings the same register twice in a row:

writeAccReg(LSM303_CTRL_REG4_A, 0x08); // high resolution output mode
writeAccReg(LSM303_CTRL_REG4_A, 0x20); // 8 g full scale: FS = 10 on DLHC

That could explain why the raw readings were all a multiple of 4: we're not actually using high resolution output mode.