When my JD decides that his battery level is low, he lurches forward from a standing position and does a spectacular faceplant on my desk or floor!
To prevent the poor guy cracking his face, I was hoping to script an early warning system that would advise me when he was approaching critical level so I could at least lay him down flat first.
If I recall correctly, the battery warning cuts in at around 6.6 volts so I wrote this small code snippet which runs after connection to alert me when the voltage dipped below 7 volts.
if ($batteryLevel < 7)
ControlCommand("Soundboard v4", Track_12)
sleep( 60000 )
Track 12 is an audio file that advises 'Energy Cell Exhausted' (I know many of you will guess where that came from ).
Whilst the script works, it is not reliably firing off before JD complains his battery level is low and does his faceplant thing.
Can anyone suggest a better method of achieving an early warning alert?