From d849d9d2d92b198207e3a6455af361fd8fe39c13 Mon Sep 17 00:00:00 2001 From: Mehmet Bertan Tarakcioglu <83073748+BertanT@users.noreply.github.com> Date: Sat, 1 Nov 2025 23:47:21 -0400 Subject: [PATCH 1/2] Fix example displaying amperes instead of miliamperes --- examples/ina228_simpletest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ina228_simpletest.py b/examples/ina228_simpletest.py index c3adda5..bd5aaf2 100644 --- a/examples/ina228_simpletest.py +++ b/examples/ina228_simpletest.py @@ -18,7 +18,7 @@ while True: print("\nCurrent Measurements:") - print(f"Current: {ina228.current:.2f} mA") + print(f"Current: {ina228.current*1000:.2f} mA") print(f"Bus Voltage: {ina228.bus_voltage:.2f} V") print(f"Shunt Voltage: {ina228.shunt_voltage*1000:.2f} mV") print(f"Power: {ina228.power:.2f} mW") From dada4bca746e7ba882bf43c3d486f62fd6708cfd Mon Sep 17 00:00:00 2001 From: Mehmet Bertan Tarakcioglu <83073748+BertanT@users.noreply.github.com> Date: Sat, 1 Nov 2025 23:59:12 -0400 Subject: [PATCH 2/2] Fix example displaying Watts instead of Milliwatts --- examples/ina228_simpletest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ina228_simpletest.py b/examples/ina228_simpletest.py index bd5aaf2..8a02f24 100644 --- a/examples/ina228_simpletest.py +++ b/examples/ina228_simpletest.py @@ -21,7 +21,7 @@ print(f"Current: {ina228.current*1000:.2f} mA") print(f"Bus Voltage: {ina228.bus_voltage:.2f} V") print(f"Shunt Voltage: {ina228.shunt_voltage*1000:.2f} mV") - print(f"Power: {ina228.power:.2f} mW") + print(f"Power: {ina228.power*1000:.2f} mW") print(f"Energy: {ina228.energy:.2f} J") print(f"Temperature: {ina228.die_temperature:.2f} °C") time.sleep(1)