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 alarmsbarbudor_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.
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.
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
see example.
Contributions welcomed. My goal is to keep the library simple and as low on memory as possible.