adxl345

Hello,

Im not good at reading data sheets and have some questions regarding configuration of the adxl345 accelerometer. From my understanding the default acceleration is 2g and the resolution is 10bit, however, how is it possible to change the acceleration/resolution in the code? What kind of information should I be looking for in the data sheet? Im using i2c and wire library. I need a register value and a hex-number. Any suggestion where I can understand/convert hex-numbers?

Thanks for considering my problem.

You need to look at the Data_Format register (0x31), 2LSBs to change the range.

Thanks for the replay, I found it! ;D

To answer your other question, hex is just a convenient way of representing binary.
A hexadecimal number has 16 possible values, 0..15 in decimal.
For the values 10 to 15, letters are used, so the nummber range is
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. In binary:
0000, 0001, 0010, 0011, 0..3
0100, 0101, 0110, 0111, 4..7
1000, 1001, 1010, 1011, 8..B
1100, 1101, 1110, 1111 C..F

In binary, you can represent 16 values with four bits, and a byte (eight bits) is thus two hexadedecimal digits wide.

Once again, thanks a lot! Very useful ;D