Merge pull request #5 from jlunz/jl/fixes_after_split
Some checks failed
Build CI / test (push) Has been cancelled
Some checks failed
Build CI / test (push) Has been cancelled
Fix examples to use changed attributes
This commit is contained in:
commit
94a7519c80
2 changed files with 6 additions and 6 deletions
|
|
@ -103,11 +103,11 @@ Usage Example
|
|||
|
||||
while True:
|
||||
print(f"Current: {ina228.current:.2f} mA")
|
||||
print(f"Bus Voltage: {ina228.voltage:.2f} V")
|
||||
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"Energy: {ina228.energy:.2f} J")
|
||||
print(f"Temperature: {ina228.temperature:.2f} °C")
|
||||
print(f"Temperature: {ina228.die_temperature:.2f} °C")
|
||||
time.sleep(1)
|
||||
|
||||
Documentation
|
||||
|
|
|
|||
|
|
@ -12,16 +12,16 @@ i2c = board.I2C()
|
|||
ina228 = adafruit_ina228.INA228(i2c)
|
||||
print("Adafruit INA228 Test")
|
||||
|
||||
print(f"Bus conversion time: {ina228.conversion_time_bus} microseconds")
|
||||
print(f"Shunt conversion time: {ina228.conversion_time_shunt} microseconds")
|
||||
print(f"Bus conversion time: {ina228.bus_voltage_conv_time} microseconds")
|
||||
print(f"Shunt conversion time: {ina228.shunt_voltage_conv_time} microseconds")
|
||||
print(f"Samples averaged: {ina228.averaging_count}")
|
||||
|
||||
while True:
|
||||
print("\nCurrent Measurements:")
|
||||
print(f"Current: {ina228.current:.2f} mA")
|
||||
print(f"Bus Voltage: {ina228.voltage:.2f} V")
|
||||
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"Energy: {ina228.energy:.2f} J")
|
||||
print(f"Temperature: {ina228.temperature:.2f} °C")
|
||||
print(f"Temperature: {ina228.die_temperature:.2f} °C")
|
||||
time.sleep(1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue