4 releases (2 breaking)

0.3.0 May 11, 2024
0.2.0 Jan 30, 2024
0.1.1 Jan 30, 2024
0.1.0 Mar 27, 2022

#570 in Hardware support

Download history 20/week @ 2024-06-30 5/week @ 2024-07-07 74/week @ 2024-07-14 126/week @ 2024-07-21 48/week @ 2024-07-28 180/week @ 2024-08-04 111/week @ 2024-08-11 65/week @ 2024-08-18 78/week @ 2024-08-25 46/week @ 2024-09-01 47/week @ 2024-09-08 68/week @ 2024-09-15 229/week @ 2024-09-22 55/week @ 2024-09-29 162/week @ 2024-10-06 392/week @ 2024-10-13

838 downloads per month

MIT/Apache

24KB
388 lines

ina226

Rust embedded-hal driver for the Texas Instruments INA226.

License

Rand is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.


lib.rs:

This is a platform agnostic Rust driver for the INA226, an I2C output current/voltage/power monitor with alerts, using the embedded-hal traits.

This driver allows you to:

The device

The INA226 is a current shunt and power monitor with an I2C™- or SMBUS-compatible interface. The device monitors both a shunt voltage drop and bus supply voltage. Programmable calibration value, conversion times, and averaging, combined with an internal multiplier, enable direct readouts of current in amperes and power in watts.

The INA226 senses current on common-mode bus voltages that can vary from 0 V to 36 V, independent of the supply voltage. The device operates from a single 2.7-V to 5.5-V supply, drawing a typical of 330 µA of supply current. The device is specified over the operating temperature range between –40°C and 125°C and features up to 16 programmable addresses on the I2C-compatible interface.

Datasheet:

Dependencies

~2MB
~43K SLoC