Crates.io | ina219 |
lib.rs | ina219 |
version | 0.2.0 |
source | src |
created_at | 2018-03-08 02:55:13.995755 |
updated_at | 2024-09-18 12:59:58.068101 |
description | INA219 current/power monitor driver |
homepage | |
repository | https://github.com/scttnlsn/ina219 |
max_upload_size | |
id | 54491 |
size | 101,628 |
Blocking and async driver for the INA219 current/power monitor by Texas Instruments.
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.
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.
The 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.