ina233

Crates.ioina233
lib.rsina233
version0.1.1
created_at2025-01-20 19:21:41.991948+00
updated_at2025-03-08 19:02:01.00783+00
descriptionA Rust driver for the Texas Instruments INA233 power monitor.
homepage
repositoryhttps://github.com/finn-eger/ina233
max_upload_size
id1524187
size26,523
Finn Eger (finn-eger)

documentation

README

A Rust driver for the Texas Instruments INA233 power monitor. Currently incomplete, with support for basic (continuous) readings only.

For usage details and explanatory notes, see the documentation.

Overview

let i2c: Bus = todo!(/* Setup I2C */);

// Setup a device:
const ADDRESS: u8 = 0x40;
let shunt_resistance = ElectricalResistance::new::<milliohm>(5.0);
let maximum_current = ElectricCurrent::new::<ampere>(1.0);
let mut device = Ina233::<_, ADDRESS>::new(i2c, shunt_resistance, maximum_current)?;

// Get latest readings:
device.voltage()?;
device.current()?;
Commit count: 7

cargo fmt