Skip to main content

CircuitPython library for NXP FXAS21002C gyroscope.

Project description

Introduction

Documentation Status Discord Build Status Code Style: Ruff

CircuitPython module for the NXP FXAS21002C gyroscope.

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

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

sudo pip3 install adafruit-circuitpython-fxas21002c

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

Usage Example

import time
import board
import adafruit_fxas21002c

i2c = board.I2C()  # uses board.SCL and board.SDA
sensor = adafruit_fxas21002c.FXAS21002C(i2c)

while True:
    gyro_x, gyro_y, gyro_z = sensor.gyroscope
    print('Gyroscope (radians/s): ({0:0.3f},  {1:0.3f},  {2:0.3f})'.format(gyro_x, gyro_y, gyro_z))
    time.sleep(1.0)

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_fxas21002c-3.0.9.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file adafruit_circuitpython_fxas21002c-3.0.9.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_fxas21002c-3.0.9.tar.gz
Algorithm Hash digest
SHA256 8af2dc9cc87e7ba49e7beeb08366e408322c6fcb73ce98ce588155627b00c0ae
MD5 9592377ff00aad4b32e361104ea7f162
BLAKE2b-256 4706c63d911c259f7aacf84742fea4e6f657fb094c73f0c22ac99afcb929f2c0

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_fxas21002c-3.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_fxas21002c-3.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 980ec2f92e0d9a1dc80e9a84faa8b31404b05807bf1fbb1e8dc020004ee56967
MD5 841fde9d4e760c0cad69b243b3e9dc13
BLAKE2b-256 c8318a7b2a37cde18dcddf87c76cdcf1e83ea34302083d99de3d7692e2f5affd

See more details on using hashes here.

Supported by

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