Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8621

Advanced users • SOLVED help using ADXL345

$
0
0
Further study of the data sheet shows:-

Code:

Register 0x32 to Register 0x37 (DATAX0-DATAZ1)These … are eight bits each and hold the output data for each axis.The output data is twos complement. 

Code:

Register 0x31 (DATA_FORMAT)When the FULL_RES bit is … 0, the device is in 10-bit modeRange BitsThese bits set the g range.0 0 ±2 g
This implies 2**10 // 4 i.e. 256 is the scale factor needed to convert the integral value to a g value.
This implies that the 10 bit value represents ±2g i.e. 4g so each bit corresponds to g/256

(This may need to change if not in FULL_RES using higher resolution.)

Statistics: Posted by Milliways — Tue May 06, 2025 6:55 am



Viewing all articles
Browse latest Browse all 8621

Trending Articles