A CircuitPython driver for the ADXL37x family of accelerometers
Project description
Introduction
A CircuitPython I2C driver for the ADXL37x 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 or individual libraries can be installed using circup.
This library works with the ADXL375 accelerometer breakout over I2C.
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-adxl37x
To install system-wide (this may be required in some cases):
sudo pip3 install adafruit-circuitpython-adxl37x
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-adxl37x
Installing to a Connected CircuitPython Device with Circup
Make sure that you have circup installed in your Python environment. Install it with the following command if necessary:
pip3 install circup
With circup installed and your CircuitPython device connected use the following command to install:
circup install adxl37x
Or the following command to update an existing version:
circup update
Usage Example
import time
import board
import adafruit_adxl37x
i2c = board.I2C()
accelerometer = adafruit_adxl37x.ADXL375(i2c)
while True:
print("%f %f %f" % accelerometer.acceleration)
time.sleep(0.2)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file adafruit-circuitpython-adxl37x-1.1.4.tar.gz
.
File metadata
- Download URL: adafruit-circuitpython-adxl37x-1.1.4.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6069c463e1bdc3d2598317aba828c1e71bf7620d7f43866046828b3d45677b77 |
|
MD5 | e7984352deb36c44de9b53ac3fcf65f3 |
|
BLAKE2b-256 | 66bcb6be68e1facbc4812cb2f09ad05f7be843d24f526ce56e1334ae82e37afb |
File details
Details for the file adafruit_circuitpython_adxl37x-1.1.4-py3-none-any.whl
.
File metadata
- Download URL: adafruit_circuitpython_adxl37x-1.1.4-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5182a730b7f25686fcb627042c91f7c754f92cdab8a5465f45a9716661361277 |
|
MD5 | 2d84af4d51e71c1a4fc8a515ff686c4b |
|
BLAKE2b-256 | b6a533b829d864f1aac1ea1898b4da4950829c46204fba1621838d190d17acd3 |