This is a device driver that enables a Raspberry Pi to access an LSM9DS1 IMU sensor.
The LSM9DS1 combines a 3D accelerometer, 3D rate gyroscope and a 3D magnetometer. It's useful in robotics and other applications for measuring a robot's attitude and movement. The LSM9DS1 is made by ST Microelectronics. The datasheet is available from their website.
Low cost breakout boards are available from various vendors including Adafruit and Sparkfun.
This driver returns raw unscaled data. This is a deliberate choice to make it easier to scale the data with your application.
If you don't check for data ready and just read data then you will miss some samples. Worse than that, in some cases you'll read part of one sample and part of the next. This provides plausible looking but incorrect data. You must wait for data ready before reading the sensor values. See the examples.
This library depends on smbus2
which introduced a breaking change in version 0.4.0
. Please upgrade smbus2
or install v0.9.2 of this library.