]> git.friedersdorff.com Git - max/battery_tester.git/commitdiff
Flash when battery voltage is low
authorMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 21 Jun 2022 07:46:31 +0000 (08:46 +0100)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 21 Jun 2022 07:46:31 +0000 (08:46 +0100)
battery_tester.ino

index f948ec23b6c4468ef00e55e35a250d8a52a408a2..bed857ffe495bd70e35b76a9f91e3f7eea7eda78 100644 (file)
@@ -119,6 +119,10 @@ void loop() {
     wattseconds += watts_in_period;
     mamphours = ampseconds/3.6;
     mwatthours = wattseconds/3.6;
+
+    if (battery_voltage < 0.8) {
+      delay(200);
+    }
   }
   showNumber(mamphours);
 }