Library and state machine to record Vin and system temperature.