Richard-Gemmell / lsm9ds1-rjg

Pure python driver for the LSM9DS1 IMU sensor made by ST Microelectronics.
MIT License
8 stars 5 forks source link

lsm9ds1-rjg

Introduction

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.

Driver Features

Limitations

Scaling

This driver returns raw unscaled data. This is a deliberate choice to make it easier to scale the data with your application.

Data Ready

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.

Examples

Known Issues

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.