Library for interfacing STMicroelectronics LIS2DH three-axis accelerometer
The LIS2DH is an ultra-low-power high- performance three-axis linear accelerometer. -) I2C interface with communication speed up to 400 kHz
typical I2C clock speed to be used (400kHz, I2C Fast-Mode)
Available LIS2DH I2C addresses
CTRL1 configuration bits
Output data rate and power mode selection (CTRL1, bit 4-7)
CTRL4 configuration bits
Full-scale selection (CTRL4, bit 4-5)
Self test selection (CTRL4, bit 1-2)
Initializes communication with the LIS2DH and prepares the LIS2DH for use
First of all the device ID is read out.
Activates the LIS2DH by setting the "CTRL1" and "CTRL4" register
Reads acceleration data in mg from the LIS2DH
Reads Temperature data in °C from the IS2DH
Sets the LIS2DH into power-down mode (i.e. no data sampling is performed) and thus grants minimum power consumption
absolute maximum I2C clock speed
Available register (Address | R/W | Default | Description)
Temperature data status bits
Temperature configuration bits
Temperature sensor enable (REG_TEMP_CFG, bit 6-7)
CTRL2 configuration bits
High pass filter modes (CTRL2, bits 6-7)
CTRL3 configuration bits
CTRL5 configuration bits
CTRL6 configuration bits
Status data bits
FIFO control bits
FIFO mode selection (FIFO_CTRL, bit 6-8)
Trigger selection (FIFO_CTRL, bit5)
FIFO source bits
Interrupt 1 configuration bits
Interrupt mode selection (INT1_CFG, bit 6-8)
Interrupt 1 source bits
Interrupt 2 configuration bits
Interrupt mode selection (INT2_CFG, bit 6-8)
Interrupt 2 source bits
Click-Click configuration bits
Click-Click source bits
Reads a register of the LIS2DH
Reads raw data from a number of LIS2DH registers
Writes a register of the LIS2DH
Reads raw acceleration data from the LIS2DH