Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Platform-agnostic Rust driver for the PAC194x 9V, 16-bit power monitor with alerts

License

Notifications You must be signed in to change notification settings

FrameworkComputer/pac194x

Open more actions menu
 
 

Repository files navigation

Rust PAC19[4/5]X Power Monitor Driver

A platform-agnostic driver crate for the Microchip PAC194X and PAC195X single/multi channel power monitors using the embedded-hal traits.

Build Status Docs.rs Crates.io

This driver allows you to:

  • Read/Write every available register as a Rust data structure, allowing you to configure alerts, averaging, etc.
  • Read the bus and sense voltages directly as f32s

Usage

To use this driver, import this crate and an embedded_hal implementation, then instantiate the appropriate device. See the examples folder for example code.

Run it on Linux with cargo build --examples linux && sudo ./target/debug/examples/linux. It's hardcoded to bus /dev/i2c-3 and I2C address 0b10000 (grounded).

Discussion

I wrote a blog post about the development of this crate here

License

Licensed under either of

at your option.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Platform-agnostic Rust driver for the PAC194x 9V, 16-bit power monitor with alerts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 98.4%
  • Nix 1.6%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.