Reading the battery voltage issues

Hi @msfujino .

Thank you for your reply.

In my case i’m not actually using Arduino code. I created my own application in C using ESP-IDF.

From what I gather from your response, the behavior which i’m observing in my project is therefore correct?

No battery connected = I’m reading the voltage of the charge controller.
Battery connected = i’m reading the battery voltage.

By the way, analogReadMilliVolts(), does this directly read the battery terminal / charge controller? Or it’s still reading via a voltage divider feedback to an input GPIO as I have it? I guess it’s a wrapper to allow easy reading of an analogue input.