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

#484 in Hardware support

Download history 135/week @ 2024-07-16 80/week @ 2024-07-23 80/week @ 2024-07-30 132/week @ 2024-08-06 108/week @ 2024-08-13 80/week @ 2024-08-20 68/week @ 2024-08-27 42/week @ 2024-09-03 58/week @ 2024-09-10 123/week @ 2024-09-17 167/week @ 2024-09-24 103/week @ 2024-10-01 138/week @ 2024-10-08 400/week @ 2024-10-15 41/week @ 2024-10-22 26/week @ 2024-10-29

659 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
~44K SLoC