accelerometer adxl345 isnt working

we tryed to make it work for 5 days, with no success, all the connections are fine, and we use then new code example but when we run it, it said 0 only.
we checked and it stuck in an endless while loop in:
adxl345 SPI open -> SPI read -> a while loop that stop when:
“SPI read #convd(i think)” isnt equal to 0 - and it send 0 only…
if anyone know what exectly is the problem, please help us.

Which cord are you using to connect your c-rio to your digital sidecar? We had this same issue and fixed it by connecting the new ribbon cable instead of the cable from past years.
Hope this helps!

we tryed the both of them, and none of them work…

Try using the address 0XA6, the sensor documatation indcates that the default address is 0x3A and 0xA6 when shorting J1. I belive the documentation is in error.

Once the address was changed to 0xA6 I2C communications worked. Also confirmed this by ohming the alt addrss per the Analog devices data sheet.

-pete

the address change will work for I2C only or to SPI too?