From 1e04b7b930ca17bcb92937a587b867c90b8fc3bb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Oct 2018 21:43:08 -0400 Subject: [PATCH] changes --- python/readcurrent.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/readcurrent.py b/python/readcurrent.py index 6065aca1..94d9ee44 100644 --- a/python/readcurrent.py +++ b/python/readcurrent.py @@ -6,7 +6,13 @@ try: from ina219 import DeviceRangeError INA219DISABLE=0 ina = INA219(SHUNT_OHMS, MAX_EXPECTED_AMPS, 0x4a) +except: + print "Error" +try: ina.wake() +except: + print "Error2" +try: ina.configure(ina.RANGE_16V) ina.voltage() ina.current()