Skip to content

A Linux program which can make alarm sound in the terminal while battery voltage is out of proper range (not good for the battery) and make some statistic information.

License

Notifications You must be signed in to change notification settings

wuwbobo2021/simple-battery-voltage-alarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

simple-battery-voltage-alarm

A Linux program which can make alarm sound in the terminal while battery voltage is out of proper range (not good for the battery) and make some statistic information.

Installation

git clone https://github.com/wuwbobo2021/simple-battery-voltage-alarm
cd simple-battery-voltage-alarm
sudo g++ simplevoltagealarm.cpp -std=c++11 -pthread -o /usr/bin/simple-battery-voltage-alarm

Known problems

  1. This is a terminal program, which cannot run on startup or in background, and it may supsend in sleep mode.
  2. This program only suports single battery.
  3. Calculation of 'mAh' don't care the internal resistance (maybe it's not a problem).
  4. Yet this program don't use the interface functions declared in 'power_supply.h' of Linux kernel headers. (it might not be a problem) Reference: https://www.kernel.org/doc/html/latest/power/power_supply_class.html

About

A Linux program which can make alarm sound in the terminal while battery voltage is out of proper range (not good for the battery) and make some statistic information.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages