Driver for an Analog Devices ADXL345 3-axis accelerometer.
All correct at time of writing, but as always, manufacturers love to move things around on their website.
http://www.analog.com/en/sensors/inertial-sensors/adxl345/products/product.html
http://www.analog.com/static/imported-files/data_sheets/ADXL345.pdf
This code has been tested using a SolderCore CoreTilt module:
http://soldercore.com/products/sensecore/coretilt/
This was wired to a CoreProto and plugged into a SenseCore:
http://soldercore.com/products/sensecore/
And finally installed on a SolderCore:
http://soldercore.com/products/soldercore/
Parameter | Supported settings |
Bandwidth (Hz) | 0.05, 0.1, 0.2, 0.39, 0.78, 1.56, 3.13, 6.25, 12.5, 25, 50, 100, 200, 400, 800, 1600 |
Range (g) | ±2, ±4, ±8, ±16 |
Communication | up to 3.4 MHz (I2C) and 5 MHz (SPI) |
Constants | |
ADXL345_I2C_ADDR_ALTERNATE | Alternate 8-bit I2C address |
ADXL345_I2C_ADDR_DEFAULT | Default 8-bit I2C address |
Functions | |
adxl345_initialize_i2c | Initialize sensor on I2C bus |
adxl345_initialize_spi | Initialize sensor on SPI bus |