Driver for STMicroelectronics LIS331HH 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.
http://www.st.com/internet/analog/product/247976.jsp
http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00250937.pdf
This code has been tested using a SparkFun LIS331HH breakout:
http://www.sparkfun.com/products/10345
This was wired to a CoreProto and plugged into a SenseCore:
http://soldercore.com/products/sensecore/
And finally installed on a SolderCore:
http://soldercore.com/products/soldercore/
Parameter | Supported settings |
Bandwidth (Hz) | 50, 100, 400, 1000 |
Range (g) | ±6, ±12, ±24 |
Communication | up to 400 kHz (I2C) and 10 MHz (SPI) |
Macros | |
LIS331HH_I2C_ADDR | LIS331HH 8-bit I2C address selected with SA0 signal |
LIS331HH Accelerometer | |
lis331hh_initialize_i2c | Initialize sensor on I2C bus |
lis331hh_initialize_spi | Initialize sensor on SPI bus |