Driver for STMicroelectronics LIS331DLH 3-axis accelerometer in SPI or I2C mode.
All correct at time of writing, but as always, manufacturers love to move things around on their website.
This code has been tested using a SparkFun LSM303DLH breakout:
This was wired to a CoreProto and plugged into a SenseCore:
And finally installed on a SolderCore:
|Bandwidth (Hz)||50, 100, 400, 1000|
|Range (g)||±2, ±4, ±8|
|Communication||up to 400 kHz (I2C) and 10 MHz (SPI)|
|LIS331DLH_I2C_ADDR||LIS331DLH 8-bit I2C address selected with SA0 signal|
|lis331dlh_initialize_i2c||Initialize sensor on I2C bus|
|lis331dlh_initialize_spi||Initialize sensor on SPI bus|