Skip to main content

INA228

Driver for TI INA228 with SMBUS

Building

Just run:

python3 -m build

Requirements

For now, it relies on smbus2 module.

Testing

After building the package, create venv:

python3 -m venv .venv

Install the module:

.venv/bin/pip install dist/ina228-*.whl --force-reinstall

Run the test:

.venv/bin/python tests/test.py

Test will use supplied stub_regmap.py, not the real INA228. If you want your own one, generate it by running ./map.sh > stub_regmap.py on the system with live INA228. You may need to edit bus number and slave address in map.sh though. And remember to install i2cget with something like apt install i2c-tools prior to running this.

If you want to use pytest, install it into venv:

.venv/bin/pip install pytest

And then run:

.venv/bin/python -m pytest

Metadata

Release files for ina228 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ina228 0.0.2
File Size Uploaded
ina228-0.0.2.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ina228 0.0.2
File Interpreter ABI Platform
ina228-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 16.1 kB

Release files / ina228-0.0.2.tar.gz

Download URL ina228-0.0.2.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e46180584ee7b427a74ab9361351e51525838c6967a5061f2ab6031d3853f548
BLAKE2b-256 checksum
How to use checksums
e843f5a9b8dbf859524262c652a415a7292c92af53f9d72d7817345bdbbee452
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / ina228-0.0.2-py3-none-any.whl

Download URL ina228-0.0.2-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26c8a198833d4ae82778dd1ab5c5638b1b381d291b9ff98c9a20d8706bec287f
BLAKE2b-256 checksum
How to use checksums
3434a1a154cf705acfce7902062144d2118173ebc44bb1ee94f9b3eb756a9262
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page