LIS3DH 3 degrees sensor
Constructor to create LIS3DH sensor
arObj - the arduino parent object
propertyname, propertyvalue - optional property name, value pairs. Current known properties are: Current properties are:
I2C address of the sensor (default 0x40)
I2C bus - 0 or 1 (default 0)
obj - created object
a = arduino()
sensor = lis3dh(a)
Read the acceleration rate
obj - the sensor object
readVal - the 3 acceleration values
timestamp - timestamp when read
Read the sensor data
obj - the sensor object
accel - acceleration reading from sensor.
timestamp - timestamp when read
overrun - overrun flag.
readings - table structure with fields for Timestamp, Acceleration.
Read the sensor info
obj - the sensor object
inf - structure containing the sensor information.
Structure fields are:
sensor id value
sensor type ’lis3dh’
sensor status value
Flush sensor data
obj - the sensor object
None
Release the resources of the sensor
obj - the sensor object
None
Package: arduino