lis331dlh-accelerometer

xod-dev/st-mems/lis331dlh-accelerometer

Reads acceleration from an accelerometer based on LIS331DLH IC by STMicroelectronics. It is expected the accelerometer is connected to the first hardware I²C bus. Possible errors: — Invalid I2C address — Data too long to fit in transmit buffer — Received NACK on transmit of address — Received NACK on transmit of data — Other error — No bytes written. Probably due to buffer overflow — Can't read the value
lis331dlh-accelerometer
@/lis331dlh-accelerometer
Reads acceleration from an accelerometer based on LIS331DLH IC by STMicroelectronics. It is expected the accelerometer is connected to the first hardware I²C bus. Possible errors: — Invalid I2C address — Data too long to fit in transmit buffer — Received NACK on transmit of address — Received NACK on transmit of data — Other error — No bytes written. Probably due to buffer overflow — Can't read the value
ADDRbyte
I²C address. 18h by default. Some board configurations use 19h instead.
I2Cxod/i2c/i2c
SENSnumber
Sensitivity. Can be 2 (default), 4, or 8. Defines bounds of measurements expressed in ɡ (standard gravity) units. E.g. max ±4g. The lower the sensitivity the better output precission. Inaccurate values are rounded up to a nearest correct sensitivity level.
UPDpulse
Triggers reading of the accelerometer.
lis331dlh-accelerometer
Yg
Xg
OK
Zg
ADDR
I2C
SENS
UPD
Zgnumber
Acceleration along Z axis. Expressed in ɡ units.
OKpulse
Fires when reading is done
Xgnumber
Acceleration along X axis. Expressed in ɡ units.
Ygnumber
Acceleration along Y axis. Expressed in ɡ units.
To use the node in your project you should have the xod-dev/st-mems library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.