Hi, I want to use the LIS3DH acceleration sensor (on the RAK5010) for some motion analysis.
I tried to use both libaries (https://github.com/adafruit/Adafruit_LIS3DH and https://github.com/sparkfun/SparkFun_LIS3DH_Arduino_Library) to get the acceleration values.
But when I calculate the total sum acceleration vector:
(where x, y, z are the acceleration values on the 3-axis in m/s²)
I get values up to 0.5 m/s² when the board is lying and not moving at all.
My expectation is, that the total sum acceleration vector should be 0 when there is no movement (–> no acceleration).
- Board: RAK5010
- Dev-Setup: Visual-Studio-Code + Arduino
SENSORS_GRAVITY_EARTH I use the value from Adafruit (https://github.com/adafruit/Adafruit_Sensor/blob/master/Adafruit_Sensor.h).
Also 0.5 is so much, that it cannot be just a rounding-error.
For the acceleration-data (x, y, z) I tried all ways of retrieving the data. Eg with adafruit libary:
lis3dh_sensor.getEvent(&lis3dh_event); acc_vector = sqrt(sq(lis3dh_event.acceleration.x) + sq(lis3dh_event.acceleration.y) + sq(lis3dh_event.acceleration.z)) - SENSORS_GRAVITY_EARTH;
does anyone has any ideas on this issue ? Would be amazing to get some hints