CircuitPython library for INA3221 triple channel current sensor.
Project description
Introduction
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file barbudor-circuitpython-ina3221-2.0.0.tar.gz
.
File metadata
- Download URL: barbudor-circuitpython-ina3221-2.0.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4acd9df313f2e9c1f97c5791fdf7a311fbeda67bc021938db745d5d9dc25a0a5 |
|
MD5 | 07f9d7c39d36a9d4436a2f4c67d2192c |
|
BLAKE2b-256 | c9de8e50f6555e39eaadc4136552fcce6a185b60d3fb2ca429ab2eb2357b8499 |