Adxl343 library not working

Status
Not open for further replies.

Ankur26

Member
Hello everyone , so I'm trying to make a project which involves the use of accelerometer data with the teensy 3.2 . The accelerometer I'm using is adxl343 which is similar to adxl345 but I've tried all kinds of libraries and sample codes I'm not able to receive any sort of data from the accelerometer. It only shows either a bad wiring error or it shows all 0s for xyz values. Even after using the wire libraries I'm not getting any output. Any sort of help would be appreciated.
Thanks.
 
Provide more details: which adxl343 are you using? are you using I2C or SPI? for I2C you need pullup resistors on SDA and SCL. which library are you using?

Adafruit has a ADXL343 breakout with example code, and breakout has pullup resistors. Maybe attach a photo of your wiring between T3.2 and ADXL.

Sparkfun ADXL343

Wire lib has an I2Cscanner example that you can use to identify I2C devices hooked to your T3.2
 
Hi , so I'm using i2c currently for the accelerometer and have put pull up resistors across the scl and sda lines . I tested the adxl343 library by adaftuit but it gives me a message saying that wiring is not correct but I've followed the instructions as given on the adxl343 site and pjrcs twi site.
 
I tried the same at first by not using any pull up resistors but that also does not work for some reason . I will try it out again and post on the forum if it manages to work.
Thanks for all the help
 
your photo didn't show a connection to 3.3v??? I don't know what the white wire was hooked to.... pin 13??? are the header pins soldered?
 
The 3.3V connection is coming from the pin placed next to vbat as I was not getting 3.3V output at pin 24 which is right above the A9 pin. I've attached the marked pin photo in the previous link. Also the accelerometer is soldered but the teensy is not. And I was getting 3.3V when I connect the USB port so I don't think there should be a problem with the teensy connection itself.
 
The 3.3V connection is coming from the pin placed next to vbat as I was not getting 3.3V output at pin 24 which is right above the A9 pin. I've attached the marked pin photo in the previous link. Also the accelerometer is soldered but the teensy is not. And I was getting 3.3V when I connect the USB port so I don't think there should be a problem with the teensy connection itself.


You must solder the header pins to the T3.2 (or use clip jumpers) .... no solder. no workee.
 
Yes I will do that and try it out, hopefully by tomorrow I get it working .
Again thanks a lot for your help, I really appreciate it .
I will get back on this thread if there is an issue after that .
 
The 3.3V connection is coming from the pin placed next to vbat as I was not getting 3.3V output at pin 24 which is right above the A9 pin.

when you solder the headers, you'll want to get rid of your 3v3 breadboard connection next to VBAT. You don't want that 3v3 reaching the breadboard because it could short pin 13.

pjrc.com sells T3.2 with headers installed.
 
Hi , so I soldered the pins on to the teensy and to my surprise it worked . Again thanks a lot for your help. Really appreciate it . Finally it comes down to the simplest things I guess :)
 
Status
Not open for further replies.
Back
Top