# ups_monitor **Repository Path**: sndnvaps/ups_monitor ## Basic Information - **Project Name**: ups_monitor - **Description**: 微雪UPS_HAT使用rust进行驱动 - **Primary Language**: Rust - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-09-25 - **Last Updated**: 2022-10-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: ina219, Rust ## README # ups_monitor for raspberry pi ![UPS_HAT](./360px-UPS-HAT-1.jpg) ## before build it ,need to install aarch64-none-linux-gnu to system ## how to build it -> cross-compile with windows ```bash cargo build --release --target=aarch64-unknown-linux-musl ``` ## upload to the pi with pscp command ``` F:\rust\ups_monitor_rust>pscp -scp F:\rust\ups_monitor_rust\target\ aarch64-unknown-linux-musl\release\ups_monitor_rust root@192.168.xx.110:/usr/bin/ ``` ## test it on the pi ```bash root@Rpi:/usr/bin# ups_monitor_rust ``` output just look like ```json Debug: PowerMonitor { Voltage = 8.204V, Shunt_Voltage = 528µV, Current = 1.730A, Power = 711mW } Debug: PowerMonitor { Voltage = 8.204V, Shunt_Voltage = 525µV, Current = 1.720A, Power = 706mW } Debug: PowerMonitor { Voltage = 8.204V, Shunt_Voltage = 545µV, Current = 1.786A, Power = 706mW } ```