2023-08-23, 01:45 PM
Ok, got it solved.
The problem was my INA219 calling in the code. If i did it your way (with all the other i2c components on the bus) i got an error "Wire.h : NULL TX POINTER" so i did my own like this;
But it looks like this calling is not ok, so i solved it in the end like this;
This looks like it's ok. Measurement is ok now.
The problem was my INA219 calling in the code. If i did it your way (with all the other i2c components on the bus) i got an error "Wire.h : NULL TX POINTER" so i did my own like this;
Code:
///////////////////////////INA219A start
auto ina219A = new Adafruit_INA219(0x40);
bool inaA_initialized = ina219A->begin(i2c);
debugD("INA219A: %d", inaA_initialized);
///////////////////////////INA219B start
auto ina219B = new Adafruit_INA219(0x41);
bool inaB_initialized = ina219B->begin(i2c);
debugD("INA219B: %d", inaB_initialized);
///////////////////////////INA219C start
auto ina219C = new Adafruit_INA219(0x44);
bool inaC_initialized = ina219C->begin(i2c);
debugD("INA219C: %d", inaC_initialized);
But it looks like this calling is not ok, so i solved it in the end like this;
Code:
ina219A.begin(i2c);
bool inaA_initialized = ina219A.begin(i2c);
debugD("INA219A: %d", inaA_initialized);
ina219B.begin(i2c);
bool inaB_initialized = ina219B.begin(i2c);
debugD("INA219B: %d", inaB_initialized);
ina219C.begin(i2c);
bool inaC_initialized = ina219C.begin(i2c);
debugD("INA219C: %d", inaC_initialized);
This looks like it's ok. Measurement is ok now.