You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the ADXL345 has two different modes, the fixed 10-bit resolution mode and the full resolution mode. In full resolution mode one bit is always 3.9 milli-g (=MILLI_G_PER_LSB). In this mode the range of raw values depends on the range you choose:
2g: 10 bits of the data registers are used, from -2^9 to + 2^9 - 1
4g: 11 bits of the data registers are used, from -2^10 to + 2^10 - 1
8g: 12 bits of the data registers are used, from -2^11 to + 2^11 - 1
16g: 13 bits of the data registers are used, from -2^12 to + 2^12 -1
In the fixed 10-t resolution the range of raw values is 10-bit for all g-ranges. This means that 2^9 -1 in the 2g range equals +2g (1,9929 g, to be exact). In 4g range it is +4g and so on.
With setFullRes(true/false) you can switch between the modes. If true, the rangeFactor is always 1, if false 1, 2, 4 or 8 to consider changing g per bit.
I am not going to write all this into the cpp or h files. I have documented this in the examples of this library and I am explaining this also in my blog posts which are related to this library (see readme).
Thanks for the library!
What would be great for the docs to mention the min and max values.
I guess for ADXL345_RANGE_8G it would be -8G/+8G (for example).
The range of the raw values are not quite so obvious.
From the code it looks like 16bit values.
So by default it should be which could be calculated backwards per range factor.
Does that make sense?
The text was updated successfully, but these errors were encountered: