Skip to main content

CircuitPython helper library for the LSM6DS family of motion sensors from ST

Project description

Introduction

Documentation Status Discord Build Status Code Style: Ruff

CircuitPython helper library for the LSM6DS family of motion sensors from ST

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-lsm6ds

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

sudo pip3 install adafruit-circuitpython-lsm6ds

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-lsm6ds

Usage Example

import time
import board
from adafruit_lsm6ds.lsm6dsox import LSM6DSOX

i2c = board.I2C()  # uses board.SCL and board.SDA
sox = LSM6DSOX(i2c)

while True:
    print("Acceleration: X:%.2f, Y: %.2f, Z: %.2f m/s^2"%(sox.acceleration))
    print("Gyro X:%.2f, Y: %.2f, Z: %.2f radians/s"%(sox.gyro))
    print("")
    time.sleep(0.5)

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_lsm6ds-4.5.16.tar.gz (29.3 kB view details)

Uploaded Source

Built Distribution

adafruit_circuitpython_lsm6ds-4.5.16-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file adafruit_circuitpython_lsm6ds-4.5.16.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_lsm6ds-4.5.16.tar.gz
Algorithm Hash digest
SHA256 d25e439141eb93c9a5f0a9fb58f2bf1783b1e9d6ecb931bc4f355a77d3521e2b
MD5 1e1d7b205fdb56003fa44dd3209f7701
BLAKE2b-256 52b1044f193420c25724d412d8b4681996e3cec14f5aec3e29bac18c4686ce2f

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_lsm6ds-4.5.16-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_lsm6ds-4.5.16-py3-none-any.whl
Algorithm Hash digest
SHA256 b9e4ab9502ef8608c4678203f418501402899bba8265bca068d88fea68b5d8f0
MD5 fb7739e052a42a4b053a90df8d3931c2
BLAKE2b-256 d583743c93bbe8f5682af39f1d49cea5278aef32dd3a98fca2b2607c517770ff

See more details on using hashes here.

Supported by

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