Hello; i havent read the whole thread; so maybe i'm repeataing something.
im reading this tutorial: http://codeyoung.blogspot.com/2009/11/adxl345-accelerometer-breakout-board.html
and says something that recalled your problem to me: His code writes three bytes to the device before asking for a reading, to take it out from sleep mode (which will give zero readings). We are talking about I2C communication.
#define DEVICE (0x53) //ADXL345 device address
#define TO_READ (6) //num of bytes we are going to read each time (two bytes for each axis)
byte buff[TO_READ] ; //6 bytes buffer for saving data read from the device
char str; //string buffer to transform data before sending it to the serial port
Wire.begin(); // join i2c bus (address optional for master)
Serial.begin(9600); // start serial for output
//Turning on the ADXL345
writeTo(DEVICE, 0x2D, 0);
writeTo(DEVICE, 0x2D, 16);
writeTo(DEVICE, 0x2D, 8);
Look it up. then, the author then explains:
Most of the code is pretty self-explanatory, so I'll explain only the code after the //Turning on the ADXL345 comment.
As you can see we are writing three different values to register 0x2D. 0x2D is the Power Control register of the ADXL345 (see datasheet). We first reset the power control register, then put the sensor in standby mode, and last we are putting it in to measure mode. We're doing the writes one after another because that's what the datasheet recommends. We could simply do the last write also. If you don't turn on the fourth bit on (writeTo(DEVICE, 0x2D,
) the sensor will be in sleep mode, and will give zero readings!!
So the device must be waked up before use.
Hope this helps.