File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -103,11 +103,11 @@ Usage Example
103103
104104 while True :
105105 print (f " Current: { ina228.current:.2f } mA " )
106- print (f " Bus Voltage: { ina228.voltage :.2f } V " )
106+ print (f " Bus Voltage: { ina228.bus_voltage :.2f } V " )
107107 print (f " Shunt Voltage: { ina228.shunt_voltage* 1000 :.2f } mV " )
108108 print (f " Power: { ina228.power:.2f } mW " )
109109 print (f " Energy: { ina228.energy:.2f } J " )
110- print (f " Temperature: { ina228.temperature :.2f } °C " )
110+ print (f " Temperature: { ina228.die_temperature :.2f } °C " )
111111 time.sleep(1 )
112112
113113 Documentation
Original file line number Diff line number Diff line change 1212ina228 = adafruit_ina228 .INA228 (i2c )
1313print ("Adafruit INA228 Test" )
1414
15- print (f"Bus conversion time: { ina228 .conversion_time_bus } microseconds" )
16- print (f"Shunt conversion time: { ina228 .conversion_time_shunt } microseconds" )
15+ print (f"Bus conversion time: { ina228 .bus_voltage_conv_time } microseconds" )
16+ print (f"Shunt conversion time: { ina228 .shunt_voltage_conv_time } microseconds" )
1717print (f"Samples averaged: { ina228 .averaging_count } " )
1818
1919while True :
2020 print ("\n Current Measurements:" )
2121 print (f"Current: { ina228 .current :.2f} mA" )
22- print (f"Bus Voltage: { ina228 .voltage :.2f} V" )
22+ print (f"Bus Voltage: { ina228 .bus_voltage :.2f} V" )
2323 print (f"Shunt Voltage: { ina228 .shunt_voltage * 1000 :.2f} mV" )
2424 print (f"Power: { ina228 .power :.2f} mW" )
2525 print (f"Energy: { ina228 .energy :.2f} J" )
26- print (f"Temperature: { ina228 .temperature :.2f} °C" )
26+ print (f"Temperature: { ina228 .die_temperature :.2f} °C" )
2727 time .sleep (1 )
You can’t perform that action at this time.
0 commit comments