Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Merge pull request #4 from siddacious/master Dec 14, 2018
examples Adding active, dropped, and tapped for #3 Dec 14, 2018
.gitignore PyPi Setup. Oct 25, 2018
.pylintrc Initial working commit with I2C only Oct 24, 2018
.readthedocs.yml Initial working commit with I2C only Oct 24, 2018
.travis.yml PyPi Setup. Oct 25, 2018 Initial working commit with I2C only Oct 24, 2018
LICENSE Initial working commit with I2C only Oct 24, 2018
README.rst change '' to '' Dec 21, 2018 Cleaned up comment May 6, 2019
requirements.txt PyPi Setup. Oct 25, 2018



Documentation Status Discord Build Status

A CircuitPython driver for the ADXL34x family of accelerometers


This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Usage Example

import time
import board
import busio
import adafruit_adxl34x
i2c = busio.I2C(board.SCL, board.SDA)
accelerometer = adafruit_adxl34x.ADXL345(i2c)
while True:
    print("%f %f %f"%accelerometer.acceleration)


Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Building locally

Zip release files

To build this library locally you'll need to install the circuitpython-build-tools package.

python3 -m venv .env
source .env/bin/activate
pip install circuitpython-build-tools

Once installed, make sure you are in the virtual environment:

source .env/bin/activate

Then run the build:

circuitpython-build-bundles --filename_prefix adafruit-circuitpython-adxl34x --library_location .

Sphinx documentation

Sphinx is used to build the documentation based on rST files and comments in the code. First, install dependencies (feel free to reuse the virtual environment from above):

python3 -m venv .env
source .env/bin/activate
pip install Sphinx sphinx-rtd-theme

Now, once you have the virtual environment activated:

cd docs
sphinx-build -E -W -b html . _build/html

This will output the documentation to docs/_build/html. Open the index.html in your browser to view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to locally verify it will pass.

You can’t perform that action at this time.