Skip to content

CircuitPython driver for the Adafruit FSOX8700 Accelerometer/Magnetometer Breakout

License

Notifications You must be signed in to change notification settings

lxv/CircuitPython_FXOS8700

Repository files navigation

CircuitPython driver for the Adafruit FXOS8700 Accelerometer/Magnetometer Breakout

Documentation Status Discord

Introduction

CircuitPython module for the FXOS8700 Accelerometer/Magnetometer. Technical documentation on FXOS8700 chip is available online from NXP. The chip is available on a nice breakout board from Adafruit, see the guide at NXP Precision 9DoF Breakout.

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.

Usage Example

Getting the readings from accelerometer/magnetometer is easy! First, import board module for pin definitions for your specific microcontroller board, busio for native I2C communication and the driver library itself.

import board
import busio
import fxos8700

Next, initialize the I2C bus in a with statement so it always gets shut down ok. Then, instantiate FXOS8700 class:

# Read current acceleration for all three axes and print it out
with busio.I2C(board.SCL, board.SDA) as i2c:
    s = fxos8700.FXOS8700(i2c)
    print(s.acceleration)

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

API Reference

.. toctree::
   :maxdepth: 2

   api

About

CircuitPython driver for the Adafruit FSOX8700 Accelerometer/Magnetometer Breakout

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages