A library for the ST LIS331 family of high-g 3-axis accelerometers
DependenciesThis 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 PyPIOn 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-lis331
To install system-wide (this may be required in some cases):
sudo pip3 install adafruit-circuitpython-lis331
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-lis331
Usage Example
import time
import board
import adafruit_lis331
i2c = board.I2C() # uses board.SCL and board.SDA
lis = adafruit_lis331.LIS331(i2c)
while True:
print("Acceleration : X: %.2f, Y:%.2f, Z:%.2f ms^2" % lis.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.
ContributingContributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
Download filesDownload the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution Built Distribution File detailsDetails for the file adafruit_circuitpython_lis331-1.0.22.tar.gz
.
4cbe4591d1558b22be6690b4b364577b14cfba3899e3f4fb193ef8e27ff9023f
MD5 40f251f5ca2de4cd5f4a69627bea6ad8
BLAKE2b-256 9cad6685d551b2cd53d76c9d50c01a993ec530303fad2c223645e1f03e25c11e
See more details on using hashes here.
File detailsDetails for the file adafruit_circuitpython_lis331-1.0.22-py3-none-any.whl
.
fe436a9d822372dc5980790852545578fc49eba9a4fde677e3f20705a37bdce9
MD5 2547d4326d83b125ba7f6bd054387c10
BLAKE2b-256 caaa5f3044adc8a429aa8e82629056d5a781a61f171aa9c4efe45d323690364b
See more details on using hashes here.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4