I am using Particle asset tracker and i use the accelerometer example from the library, it works fine, however the reading i got using ubidots (t.readXYZmagnitude) is around 8000 when i place the box in horizontal way and no vibration at all, i need to know whats this value in terms of g, how to convert and present this value as g force.
The LIS3DH returns a 16-bit two’s complement value (-32768 to 32767).
The value is relative to the sensitivity, which can be 2G, 4G, 8G, or 16G. The hardware defaults to 2G, however the AssetTracker library overrides this to be 4G by default.
In the default 4G setting, 32767 should be +4G, so 8000 seems about right for the effect of gravity.
The LIS3DH does not have automatic gravity compensation using a gyroscope, so if you have the possibility of setting it down angled, you will run into difficulties.