From 8fbedacbc09bb302f61ac5059cea1551628a85fc Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 16 Aug 2020 22:25:30 -0400 Subject: [PATCH] Update voltage.py --- python/voltage.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/voltage.py b/python/voltage.py index fc7976fc..6017d82d 100644 --- a/python/voltage.py +++ b/python/voltage.py @@ -34,12 +34,12 @@ if __name__ == "__main__": # optional : change voltage range to 16V ina219.bus_voltage_range = BusVoltageRange.RANGE_16V - bus_voltage = ina219.bus_voltage # voltage on V- (load side) - shunt_voltage = ina219.shunt_voltage # voltage between V+ and V- across the shunt + bus_voltage = ina219.bus_voltage # voltage on V- (load side) + shunt_voltage = ina219.shunt_voltage # voltage between V+ and V- across the shunt # current = ina219.current # current in mA # INA219 measure bus voltage on the load side. So PSU voltage = bus_voltage + shunt_voltage - print("{:6.3f}".format(bus_voltage + shunt_voltage)) + print("{:6.3f}".format(bus_voltage + shunt_voltage)) # print("Shunt Voltage: {:9.6f} V".format(shunt_voltage)) # print("Load Voltage: {:6.3f} V".format(bus_voltage)) # print("Current: {:9.1f} mA".format(current))