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
103
103
104
104
while True :
105
105
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 " )
107
107
print (f " Shunt Voltage: { ina228.shunt_voltage* 1000 :.2f } mV " )
108
108
print (f " Power: { ina228.power:.2f } mW " )
109
109
print (f " Energy: { ina228.energy:.2f } J " )
110
- print (f " Temperature: { ina228.temperature :.2f } °C " )
110
+ print (f " Temperature: { ina228.die_temperature :.2f } °C " )
111
111
time.sleep(1 )
112
112
113
113
Documentation
Original file line number Diff line number Diff line change 12
12
ina228 = adafruit_ina228 .INA228 (i2c )
13
13
print ("Adafruit INA228 Test" )
14
14
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" )
17
17
print (f"Samples averaged: { ina228 .averaging_count } " )
18
18
19
19
while True :
20
20
print ("\n Current Measurements:" )
21
21
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" )
23
23
print (f"Shunt Voltage: { ina228 .shunt_voltage * 1000 :.2f} mV" )
24
24
print (f"Power: { ina228 .power :.2f} mW" )
25
25
print (f"Energy: { ina228 .energy :.2f} J" )
26
- print (f"Temperature: { ina228 .temperature :.2f} °C" )
26
+ print (f"Temperature: { ina228 .die_temperature :.2f} °C" )
27
27
time .sleep (1 )
You can’t perform that action at this time.
0 commit comments