Files
wileyfox_dev/tests/batt_mon.sh
2025-09-03 06:45:49 +00:00

12 lines
261 B
Bash

# Simple script that reads the battery capacity every 30 seconds and logs it to a file
# Used to measure how long the battery lasts for when idle
while [ 1 ]
do
echo $(date) $(cat /sys/class/power_supply/pm8916-bms-vm/capacity) >> battery.log
sleep 30
done