https://github.com/scttnlsn/ina219
INA219 current/power monitor driver for Rust
https://github.com/scttnlsn/ina219
current driver ina219 power rust
Last synced: 11 months ago
JSON representation
INA219 current/power monitor driver for Rust
- Host: GitHub
- URL: https://github.com/scttnlsn/ina219
- Owner: scttnlsn
- Created: 2018-03-08T02:42:34.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-18T12:58:43.000Z (over 1 year ago)
- Last Synced: 2025-07-19T05:50:27.633Z (11 months ago)
- Topics: current, driver, ina219, power, rust
- Language: Rust
- Size: 65.4 KB
- Stars: 12
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ina219
[](https://crates.io/crates/ina219)
Blocking and async driver for the [INA219](http://www.ti.com/product/INA219) current/power monitor by Texas Instruments.
## Features
This crate has the following feature flags (default features in bold):
| Name | Description |
|----------------|------------------------------------------------------------------------|
| **sync** | Provide a blocking driver implementation |
| **async** | Provide an async driver implementation |
| **paranoid** | Perform extra checks |
| no_transaction | Disable use of transactions and perform individual system calls |
| std | Use the standard library and impl std::error::Error on all error types |
For more detailed descriptions see [Cargo.toml](Cargo.toml).
## Calibration
This driver includes ways to use the calibration feature of the INA219. However, the errors introduced by the
calculations can be unintuitive. So it can make sense to just compute the current and power in software.
## Examples
The [examples](examples/) folder contains code that demonstrates how this driver can be used. They were tested on a
Raspberry Pi with an INA219 that was configured for address 0x42.