AnsweredAssumed Answered

ADXL345 + Raspberry Pi + Linux Drivers

Question asked by EngineerByNight on Sep 4, 2012
Latest reply on Nov 15, 2017 by DragosB

Hello,

 

I'm using an ADXL345 breakout board (from Sparkfun - https://www.sparkfun.com/products/9836) connected via I2C to a Raspberry Pi (http://www.raspberrypi.org/faqs)

 

Currently, I'm using an SD card image, from Adafruit... from what I can tell, they've done everything necessary to enable I2C on the BCM2835 chipset.

http://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro/occidentalis-v0-dot-2

 

Then, I've used one of their sensor tutorials as a guide, but I have the ADXL345 connected, whereas they are using the DS1307.

http://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi/overview

 

It appears that I have everything connected fine, b/c the ADXL345 "shows up" when I issue "sudo i2cdetect -y 0"

 

i2cdetect.JPG

 

I've also verified that the ADXL345 module is included in adafruit's Occidentalis kernel:

 

zcat ADXL345.JPG

 

At this point, I'm unclear on how to move forward using the ADI Linux drivers, which are documented here:

http://wiki.analog.com/resources/tools-software/linux-drivers/input-misc/adxl345

 

I've been able to successfully control the SPI and I2C ports of the Raspberry Pi using low-level control.  But, since there is already an ADXL345 driver written, I'd prefer to understand how to use it, than to reinvent the wheel.

 

Any suggestions?  Any other "checks" I can do to makes sure driver is properly included in kernel, and device is connected properly?  Any ideas on how to move forward, and actually capture data from the ADXL345?

 

Thanks in advance for any guidance offered.

Fritzing diagram included below, to clearly illustrate physical connection to Raspberry Pi.

-Anne

 

ADXL345RaspPi Fritzing.JPG

Outcomes