Update voltcurrent.py

pull/55/head
alanbjohnston 5 years ago committed by GitHub
parent 4893f306e8
commit d6a11e4677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,8 +49,8 @@ if __name__ == "__main__":
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), "{:6.3f} ".format(current) , end = '')
print("{:5.3f} ".format(bus_voltage), "{:6.1f} ".format(current) , end = '')
except:
print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '')
print("{:5.3f} ".format(0), "{:6.1f} ".format(0), end = '')
# pass
print(" ")

Loading…
Cancel
Save

Powered by TurnKey Linux.