py-adxl345 is a Python driver for ADXL345 chips. ADXL345 chips are 3-axes digital accelerometers from Analog Devices that can communicate on serial protocols (3/4 wire SPI or 2-wire I2C).
This python driver allows to read 3D acceleration values and manage other ADXL345 functions (configuration, fifo, ...).
- Require python-smbus to use the I2C protocol
- Require py-spidev to use the SPI protocol
Either download the zip archive
Or clone it using git
git clone https://github.com/alexismeneses/py-adxl345
Run the following two command
python setup.py build
sudo python setup.py install
You have to use either I2C protocol using adxl345.i2c.ADXL345 class (recommanded) or to use SPI protocol using adxl345.spi.ADXL345 (experimental).
You can find some code usage in sample
Copyright © 2014, Alexis Meneses
This software is licensed under the MIT License (see LICENSE file).