Skip to main content

circuitpython-adxl36x

PyPI Python versions License: MIT CI Downloads Ruff

CircuitPython driver for the Analog Devices ADXL366 and ADXL367 ultra-low-power 3-axis MEMS accelerometers.

ADXL367 implements the full shared register map and is the base class. ADXL366 subclasses it, adding the pedometer, Z-axis nonlinearity compensation, and activity/inactivity reference readback - the three features the ADXL367 silicon doesn't implement. Both support SPI and I2C.

Relationship to adafruit_adxl34x

This library's public API deliberately mirrors the shape of Adafruit's adafruit_adxl34x driver for the ADXL34x family (.acceleration, .events, enable_tap_detection(), enable_motion_detection(), data_rate) so that code written against a 34x-family chip needs minimal changes to run against a 366/367. The two chip families are not register-compatible — only the driver's Python API shape is shared. Notable differences:

  • range is named g_range here instead — range shadows the Python builtin, and compatibility with the ADXL34x API takes a back seat to that on this one property.
  • No enable_freefall_detection() — the 366/367 has no freefall-detection hardware.
  • Range tops out at RANGE_8_G — the 366/367 doesn't support ±16g.
  • DataRate only has 6 discrete rates (12.5 Hz-400 Hz) vs. the 34x's 16.
  • .events includes many more keys (FIFO, pedometer, ADC/temperature thresholds) since the 366/367 exposes far more interrupt sources.

Installation

On a CircuitPython board, copy src/adxl36x/ into CIRCUITPY/lib/adxl36x/, along with the adafruit_bus_device bundle library.

For host-side development (type checking, tests) in another project:

uv add --editable ~/src/circuitpython-adxl36x

Development

uv sync
uv run ruff check --fix
uv run ruff format
uv run ty check
uv run pytest

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

circuitpython_adxl36x-0.1.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

circuitpython_adxl36x-0.1.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file circuitpython_adxl36x-0.1.0.tar.gz.

File metadata

  • Download URL: circuitpython_adxl36x-0.1.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for circuitpython_adxl36x-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5222c36abe971a00aed1adef9c21f74c485e15f0b27f16a58f4a0292ab3e4afd
MD5 0194ecb5e4c5ede94ff8e99710375f34
BLAKE2b-256 ccbfe73a39aceb58494c7afb8010a74bcc1ba45d8797f432c953f22f6f1190d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for circuitpython_adxl36x-0.1.0.tar.gz:

Publisher: release.yml on mmabey/circuitpython-adxl36x

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file circuitpython_adxl36x-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for circuitpython_adxl36x-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 541cb39d232e980ca6ec063eb69da6bc9601c1305a3effe23ef3e3cba31a39d3
MD5 0afef05e21a9bf8af3387eab56c14f54
BLAKE2b-256 18551bd6b25909bd3d00d7176ea43f312344a29883e7d563f2b486b607cb8993

See more details on using hashes here.

Provenance

The following attestation bundles were made for circuitpython_adxl36x-0.1.0-py3-none-any.whl:

Publisher: release.yml on mmabey/circuitpython-adxl36x

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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