Update voltcurrent.py

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

@ -29,7 +29,7 @@ if __name__ == "__main__":
for x in buses:
for y in addresses:
print(x,y)
try:
# try:
# Create library object using Extended Bus I2C port
print("bus: ", buses[x], " addr: ", addresses[y])
i2c_bus = I2C(buses[x]) # 1 Device is /dev/i2c-1
@ -50,6 +50,6 @@ if __name__ == "__main__":
# INA219 measure bus voltage on the load side. So PSU voltage = bus_voltage + shunt_voltage
# print("{:6.3f}".format(bus_voltage + shunt_voltage))
print(bus_voltage, " ", current, " ")
except:
print("0.0 Error")
# except:
# print("0.0 Error")

Loading…
Cancel
Save

Powered by TurnKey Linux.