Set digital pins hd44780

@anon35827816

While there may be language issue, I do not believe that is the cause for any communication issues.
I clearly understand each of the things the OP has said, the problem is that they are in conflict with each other and are not technically possible. Not everything the OP has said he wants and now says he has a working solution for can be true since it cannot technically be done.
Which means that either the actual requirements were not what the OP stated they were or not all the statements made are factually correct.

For example:
There were statements made that said certain things were needed.
One of the main ones being trying to free analog pins.
The OP went down a particular path that cannot solve all the issues he said he had, and in particular it will not free up analog pins.
Then a statement was made that a solution has been found but yet that solution does not solve the issues that were previously stated that were needed.
This is what doesn't make sense since the solution chosen does not solve the issues/needs that were previously stated.

Consider this, if you switch the i2c LCD device to use an i2c bus that uses alternate pins from the hardware i2c pins, then yes A4 and A5 used by the Wire library will no longer be used by the LCD library - HOWEVER, that doesn't actually free up A4 and A5 since those two pins are still being used by the Adafruit_INA219 library which is hardcoded to use the Wire library which will still use A4 and A5.

And this is why I keep saying if A4 and A5 are still going to be used, why add in the overhead and complexity of a 2nd i2c bus and tie up 2 additional data pins?
You can just run both 2c slaves on the same i2c bus using A4 and A5.

The OP has not provided all the information to us but had presumed a solution to his issue.
He now says he has a working solution but yet from the information we have been provided it is technically not possible to solve the issues.

This is totally an XY problem.

I'm all for trying to help someone, particularly a person that may not have all the technical skills to solve their problem, but at this point, after not getting the needed information after asking for it multiple times,
I'm really done this time.

--- bill