SPI NOT CONNECTED - adxl345

When I connected ADXL345 module with UNO, I connected them this way:
ADXL345 UNO
5v 5v
GND GND
CS D10
SDO D12
SDA D11
SCL D13

Arduino IDE prompt: SPI NOT CONNECTED

When I connected them this way:
ADXL345 UNO
5v 5v
GND GND
CS D10
SDO D11
SDA D12
SCL D13

All value in serial monitor would be "-1", anyone has fixed this?

I tried both ADXL345_WE and SPARKFUN ADXL345 library.

have had a look at adxl345-digital-accelerometer/overview - looks at though you can use it as an I2C or SPI device

for UNO SPI the following should work
GND GND
CS D10
SDO D12
SDA D11
SCL D13

does the code you are using require the CS specifing?

Found these on Page 2:

CS: This dual purpose pin can be used as the chip select line in SPI mode, but also determines whether the board will boot up into I2C or SPI mode. The default of logic high sets the board up for I2C, and manually setting this pin low and resetting will cause the device to enter SPI mode. Please note that SPI mode is not actively support and the SPI pins are not all 5V safe and level shifted, so care will be required when using it!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.