From dabebd1f91bc8feff6fd06f6a5f0910164bf8a62 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2020 13:38:39 +0100 Subject: [PATCH] working --- python/ina219_test.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/ina219_test.py b/python/ina219_test.py index d7fc2639..38435a84 100644 --- a/python/ina219_test.py +++ b/python/ina219_test.py @@ -2,14 +2,19 @@ import time import board +import smbus from adafruit_ina219 import ADCResolution, BusVoltageRange, INA219 +i2c_bus2 = smbus.SMBus(3) +b1 = i2c_bus2.read_i2c_block_data(0x45, 0x01, 2) +print (b1) -i2c_bus = board.I2C(GPIO.27, GPIO.28) + +i2c_bus = board.I2C() print(i2c_bus) -ina219 = INA219(i2c_bus) +ina219 = INA219(i2c_bus, 0x45) print("ina219 test")