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.4.tar.gz (32.1 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for adafruit-circuitpython-adxl34x-1.12.4.tar.gz
Algorithm Hash digest
SHA256 91cdf4f8e2faac4f86c947032480471db853e4fdba0a0ec91a89476e7be5e7ba
MD5 318b9826a317e3a625b8bf839af72656
BLAKE2b-256 9264e69e83e95c4b25d8d0fe000b410dd32f2723e0447adc6425d4603d8fead8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_adxl34x-1.12.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4d52ba50466d17c36f7f094aecaca71dad787028efe8be0e8e4d2ca46539c910
MD5 7369146ea54ba73a6794b99fde9c83a4
BLAKE2b-256 f99dccb120dc0ae4ba4ba56854a7d3db5bda64a1cf48f1ad12533da338765fc0

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