Skip to content

Commit a7cf909

Browse files
authored
Merge pull request #6 from BertanT/main
Fix units of measurement in the example script
2 parents 1fb64c1 + dada4bc commit a7cf909

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/ina228_simpletest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
while True:
2020
print("\nCurrent Measurements:")
21-
print(f"Current: {ina228.current:.2f} mA")
21+
print(f"Current: {ina228.current*1000:.2f} mA")
2222
print(f"Bus Voltage: {ina228.bus_voltage:.2f} V")
2323
print(f"Shunt Voltage: {ina228.shunt_voltage*1000:.2f} mV")
24-
print(f"Power: {ina228.power:.2f} mW")
24+
print(f"Power: {ina228.power*1000:.2f} mW")
2525
print(f"Energy: {ina228.energy:.2f} J")
2626
print(f"Temperature: {ina228.die_temperature:.2f} °C")
2727
time.sleep(1)

0 commit comments

Comments
 (0)