Skip to main content

A CircuitPython driver for the ADXL34x family of accelerometers.

Project description

Introduction

Documentation Status Discord Build Status Code Style: Black

A CircuitPython driver for the ADXL34x family of accelerometers

Dependencies

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.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-adxl34x

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-adxl34x

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-adxl34x

Usage Example

import time
import board
import adafruit_adxl34x

i2c = board.I2C()  # uses board.SCL and board.SDA
accelerometer = adafruit_adxl34x.ADXL345(i2c)

while True:
    print("%f %f %f"%accelerometer.acceleration)
    time.sleep(1)

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit-circuitpython-adxl34x-1.12.9.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file adafruit-circuitpython-adxl34x-1.12.9.tar.gz.

File metadata

File hashes

Hashes for adafruit-circuitpython-adxl34x-1.12.9.tar.gz
Algorithm Hash digest
SHA256 aaa04419b3f7731d22d504d6d02668ff9d158eaf1e42977ade8a43da30a91f44
MD5 b9d6305eb840fa677ce1a00bbcf58262
BLAKE2b-256 2d87bd04a3f93347e9616f170ffad283159aa54d43d99891d064d2a337ec8276

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_adxl34x-1.12.9-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_adxl34x-1.12.9-py3-none-any.whl
Algorithm Hash digest
SHA256 eadbf859b500eecd97800a9921292b3ccda2eb160d43768c3c4ed0d9685f0304
MD5 25504687f338a66466568088cbcb5014
BLAKE2b-256 14ce5060e167f2ed4f660de189ee7b46e4f1061b2992429ee67b75d73022c389

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page