added reading of 0x4a bus sensor

pull/54/head
alanbjohnston 5 years ago committed by GitHub
parent ad251a3a4e
commit abf74b3366
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -29,11 +29,15 @@ if __name__ == "__main__":
for x in buses: for x in buses:
i2c_bus = I2C(x) # Device is /dev/i2c-x i2c_bus = I2C(x) # Device is /dev/i2c-x
for y in addresses: for y in addresses:
# print(x,y) print(x,y)
try: try:
# Create library object using Extended Bus I2C port # Create library object using Extended Bus I2C port
# print("bus: ", x, " addr: ", y) # print("bus: ", x, " addr: ", y)
if x == 0 and y == 0x45:
print("Reading INA219 in MoPower Board")
i2c_bus = I2C(1)
ina219 = INA219(i2c_bus, 0x4a)
else:
ina219 = INA219(i2c_bus, y) ina219 = INA219(i2c_bus, y)
# print("ina219 test") # print("ina219 test")

Loading…
Cancel
Save

Powered by TurnKey Linux.