I need your help for trouble shooting my code. I rewrote the code from an example posted as an spark fun tutorial.
The problem is, that I'm always getting a value of 255 for every axis.
As setup I use an Arduino Due with the SparkFun breakout board ADXL345.
I linked my source code and the output of the serial monitor below.
I connected SDA to 20, SCL to 21, CS to 10 and SDO to 12. As Vcc I use the 3,3 V voltage supply.
This is neither an SPI nor an I2C connection!
If you connect SDA to 20 and SCL to 21 you can use the sensor over I2C. If you want to use SPI, the pin labeled SDA on the board gets MOSI, SCL get SCKL, SDO gets MISO.
The SPI pins on the Due are on the ICSP header, in the middle between pin 0 and A5. This page shows the pinout of the connector (although it's for the UNO on that page, the pinout is always the same).