tweaked voltage logging example