# SPI NOT CONNECTED - adxl345

**URL:** <https://forum.arduino.cc/t/spi-not-connected-adxl345/1187174>\
**Category:** Networking, Protocols, and Devices\
**Created:** [November 9, 2023, 1:23pm UTC](https://forum.arduino.cc/t/spi-not-connected-adxl345/1187174 "2023-11-09T13:23:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MianQi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/mianqi/32/220721_2.png) [@MianQi](https://forum.arduino.cc/u/MianQi)\
**Post date:** [November 9, 2023, 1:23pm UTC](https://forum.arduino.cc/t/spi-not-connected-adxl345/1187174/1 "2023-11-09T13:23:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [November 9, 2023, 6:36pm UTC](https://forum.arduino.cc/t/spi-not-connected-adxl345/1187174/2 "2023-11-09T18:36:43Z")

</div>

have had a look at [adxl345-digital-accelerometer/overview](https://learn.adafruit.com/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?

---

<div class="post-metadata">

**Author:** ![MianQi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/mianqi/32/220721_2.png) [@MianQi](https://forum.arduino.cc/u/MianQi)\
**Post date:** [November 10, 2023, 12:24am UTC](https://forum.arduino.cc/t/spi-not-connected-adxl345/1187174/3 "2023-11-10T00:24:58Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 8, 2024, 12:25am UTC](https://forum.arduino.cc/t/spi-not-connected-adxl345/1187174/4 "2024-05-08T00:25:02Z")

</div>

Closed on May 8, 2024, 12:25am UTC

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