Registry / other / ina260

ina260

JSON →
library0.3.1rscratesunverified

A platform agnostic driver to interface with the I2C based TI INA260 power monitor.

# Cargo.toml [dependencies] ina260 = "0.3.1"
INSTALL
IMPORT
SIG · INA260
I
ina260
otherrustv0.3.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Ina260
use ina260::Ina260;

Reading current from INA260 sensor via I2C

use ina260::Ina260; use linux_embedded_hal::I2cdev; fn main() -> Result<(), Box<dyn std::error::Error>> { let dev = I2cdev::new("/dev/i2c-1")?; let mut sensor = Ina260::new(dev, 0x40)?; let current = sensor.read_current()?; println!("Current: {} mA", current); Ok(()) }
Debug
Known issues
gotchaRequires an embedded-hal implementation (e.g., linux-embedded-hal)
fix
Add linux-embedded-hal or appropriate hal crate to dependencies
affects: >=0.3.0
Upgrade
Version history
0.3.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
ina260 — cargo add ina260 · libregistry