-1

I just got the ADXL345 accelerometer module. I tried everything I could find online but I can't get it work. Here's how I connect the pins to the arduino uno:

ADXL345    ->     ARDUINO
  VCC               3.3V
  CS                3.3V
  GND               GND
  SDA               SDA
  SCL               SCL

I also use 2 10kOhm resistors from SDA, SCL to 3.3V on arduino. I tried both Adafruit and SparkFun ADXL345 libraries but it doesn't work. Using Adafruit library it says that no adxl345 is connected. I tried to connect SDO to 3.3V pin and then it stopped saying no adxl345 is connected but still didn't work (no x,y,z values displayed). Then I tried SparkFun library without connecting SDO to 3.3V (because it failed) and all I got was 0, 0, 0. I literally tried everything I could find from videos, tutorials, etc. I don't know why it doesn't work. What am I doing wrong? I already ordered the MPU6050. Is it any better?

0

SDO should be tied to ground, not 3.3V. That puts it into I2C mode.

VDDIO, VS and CS all need to be on 3.3V.

To communicate with an Arduino at 5V you really need a 5V -> 3.3V I2C level shifter. I use the PCA9306DCUR.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.