This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DIY Battery Monitor - ESP32 based
#36
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;
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.
Reply


Messages In This Thread
DIY Battery Monitor - ESP32 based - by Techstyle - 2023-02-22, 07:26 PM
RE: DIY Battery Monitor - ESP32 based - by we9v - 2023-02-28, 05:16 PM
RE: DIY Battery Monitor - ESP32 based - by xsashox - 2023-08-23, 01:45 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)