|
|
|
|
@ -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")
|
|
|
|
|
|
|
|
|
|
|