Metadata-Version: 2.2
Name: ina228
Version: 0.0.2
Summary: Driver for TI INA228 with SMBUS
Author-email: Andrey Zaostrovnykh <megalloid@gmail.com>, Igor Molchanov <akemi_homura@kurisa.ch>
Maintainer-email: Igor Molchanov <akemi_homura@kurisa.ch>
Project-URL: Repository, https://github.com/makise-homura/INA228/
Project-URL: Issues, https://github.com/makise-homura/INA228/issues/
Keywords: electronics,sensing,TI,home automation,smbus,ina2xx
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Home Automation
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: smbus2

# 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
```
