.. module:: lis2hh12 *************** LIS2HH12 Module *************** This module contains the driver for STMicroelectronics LIS2HH12 3-axis accelerometer. .. class:: LIS2HH12 Class which provides a simple interface to LIS2HH12 features. .. method:: __init__(spidrv, pin_cs, clk=5000000, odr=ODR_100HZ, fs=FS_2G, sf=SF_SI) Creates an instance of LIS2HH12 class, using the specified SPI settings and initial device configuration. :param spidrv: the *SPI* driver to use (SPI0, ...) :param pin_cs: Chip select pin to access the NCV7240 chip :param clk: Clock speed, default 5 MHz :param odr: Device output data rate, default 100 Hz :param fs: Device full-scale setting, default +/-2g :param sf: Scaling factor, one of ``SF_G`` (unit=g) or ``SF_SI`` (unit=m/s^2 default) .. method:: acceleration() Acceleration measured by the sensor. :returns: By default will return a 3-tuple of X, Y, Z axis acceleration values in **m/s^2**. Will return values in **g** if constructor was provided :samp:`sf=SF_G` parameter. .. method:: temperature() Temperature measured by the sensor. :returns: Die temperature in Celsius degrees. .. method:: whoami() Value of the *WHO_AM_I* register (0x41).