#instrument #texas #monitor #power #no-std #driver #devices

no-std ina233

A Rust driver for the Texas Instruments INA233 power monitor

2 releases

new 0.1.1 Mar 8, 2025
0.1.0 Jan 20, 2025

#434 in Embedded development

Download history 84/week @ 2025-01-15 15/week @ 2025-01-22 6/week @ 2025-02-05 4/week @ 2025-02-26 118/week @ 2025-03-05

122 downloads per month

MIT license

23KB
657 lines

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

Dependencies

~1.6–2.2MB
~45K SLoC