| Crates.io | ina233 |
| lib.rs | ina233 |
| version | 0.1.1 |
| created_at | 2025-01-20 19:21:41.991948+00 |
| updated_at | 2025-03-08 19:02:01.00783+00 |
| description | A Rust driver for the Texas Instruments INA233 power monitor. |
| homepage | |
| repository | https://github.com/finn-eger/ina233 |
| max_upload_size | |
| id | 1524187 |
| size | 26,523 |
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.
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()?;