Skip to content

sndnvaps/ups_monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ups_monitor for raspberry pi

UPS_HAT

before build it ,need to install aarch64-none-linux-gnu to system

how to build it -> cross-compile with windows

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 [email protected]:/usr/bin/

test it on the pi

root@Rpi:/usr/bin# ups_monitor_rust

output just look like

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
}

About

微雪UPS_HAT第一版本的ina219驱动示例

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages