Content originally posted in LPCWare by serge on Tue Apr 16 00:09:51 MST 2013
Did you shift the 7-bit device address to the left and added the read/write bit? because otherwise your ADXL345 will not respond.
I scanned quickly through your code and found a few things
Quote:
#define DEVICE 0x00 // Device address as specified in data sheet
where the device address should be 0x53 and a little bit further in your code:
Quote:
/*Send slave address first
datval[0] = 0xE5;
I2CWrite([COLOR=red]DEVICE[/COLOR], datval, 1);
Better take a good look at your code and when you modify samples read them over and over.
Or i misinterpreted something...