Skip to main content

CircuitPython library for INA3221 triple channel current sensor.

Project description

Introduction

Documentation Status Discord Build Status

CircuitPython driver for the Texas Instruments’ INA3221 3 channels current sensor. Product page at ti.com.

2 version are available:

  • barbudor_ina3221.full includes all constants for low-level register access + API for alarms

  • barbudor_ina3221.lite only basic API and no constants - use less memory

Pick only one depending your needs. On processors with limited amount of memory (SAMD21), the lite version is recommended. You may want to use mpy-cross to precompile the library to an .mpy file for lower memory footprint.

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.

For versions of CircuitPython before v6.0, please use ina3221 library v1.2.0. Version 2.0.0 of the lib as been changed to follow the breaking changes in busdevice.i2c_device.

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 --user barbudor-circuitpython-ina3221

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

sudo pip3 install barbudor-circuitpython-ina3221

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install barbudor-circuitpython-ina3221

Usage Example

see example.

Contributing

Contributions welcomed. My goal is to keep the library simple and as low on memory as possible.

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

barbudor-circuitpython-ina3221-2.0.0.tar.gz (7.1 kB view hashes)

Uploaded Source

Supported by

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