We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 359efd7 commit e179b04Copy full SHA for e179b04
examples/ina219_simpletest.py
@@ -32,12 +32,14 @@
32
bus_voltage = ina219.bus_voltage # voltage on V- (load side)
33
shunt_voltage = ina219.shunt_voltage # voltage between V+ and V- across the shunt
34
current = ina219.current # current in mA
35
+ power = ina219.power # power in watts
36
37
# INA219 measure bus voltage on the load side. So PSU voltage = bus_voltage + shunt_voltage
38
print("PSU Voltage: {:6.3f} V".format(bus_voltage + shunt_voltage))
39
print("Shunt Voltage: {:9.6f} V".format(shunt_voltage))
40
print("Load Voltage: {:6.3f} V".format(bus_voltage))
41
print("Current: {:9.6f} A".format(current/1000))
42
+ print("Power: {:9.6f} W".format(power))
43
print("")
44
45
time.sleep(2)
0 commit comments