ina233 0.1.1

A Rust driver for the Texas Instruments INA233 power monitor.
Documentation

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()?;