lesto:
with setRangeSetting you are setting the upper (and lowest) limit. because the value are 10bit (form 0 to 1024), changing the limit also change the precision of the reading...with limit of 2, a read of 512 (zero)+(512/2=256) is 1G. BUT at limit 8, 1G it is 512+(512/8=64)
(value are just example, they can be wrong. for example, al 16G the sensor can use 16bit precision.
That means after reading the values (I'm using this library) I have to convert them?
Here is reading procedure of the library:
void ADXL345::get_Gxyz(double *xyz){
int i;
int xyz_int[3];
readAccel(xyz_int);
for(i=0; i<3; i++){
xyz[i] = xyz_int[i] * gains[i];
}
}
It looks like it multiplies the result with gains (for the 3 axis). I need to do further calculations, like the ones you suggest?