lsm9ds1 minimal configuration
Hello,
I have a very simple compass application which needs to poll the magnetometer, accelerometer and gyroscope roughly every 500mS (the board itself has no interrupt lines connected to the lsm9ds1), with the option of powering down for extended periods to save battery, but I can't make head nor tail of the data sheet.
what might be a reasonable register configuration to poll and turn on and off an lsm9ds1?
right now, what I have is this to turn on:
/* gyroscope */
write_reg(i2c_xaddr, CTRL_REG1_G, 0x78); // 119 Hz, 2000 dps, 16 Hz BW
write_reg(i2c_xaddr, CTRL_REG3_G, 0b10000000); // low power mode, high pass filter disabled
/* accelerometer */
write_reg(i2c_xaddr, CTRL_REG6_XL, 0x70); // 119 Hz, 4g
write_reg(i2c_xaddr, 0x23, 0x02); // Enable FIFO
write_reg(i2c_xaddr, 0x2E, 0xC0); // Set continuous mode
/* magnetometer */
write_reg(i2c_maddr, CTRL_REG1_M, 0b11101100); // Temperature compensation, OM XY ultra high performance, 5Hz, slow ODR, no self test
write_reg(i2c_maddr, CTRL_REG2_M, 0b00000000); // 4 gauss (this is the most sensitive; the earths magentic field is around 0.25 to 0.65 gauss)
write_reg(i2c_maddr, CTRL_REG3_M, 0b00000000); // low power off, power up continuous conversion
write_reg(i2c_maddr, CTRL_REG4_M, 0b00001100); // Z ultra high performance, LSb at lower addressd */