Measure battery power / control Vext

Hi, I successfully run a sketch derived from your example to measure battery power (https://github.com/HelTecAutomation/Heltec_ESP32/blob/master/examples/ESP32/ADC_Read_Voltage/Battery_power/Battery_power.ino).

I have some questions about this:

  1. I measure port 36 (Vin about 150 to 170 mV ) and 37 (Vbat, between 2000 and 2800 mV). Vbat is the battery voltage. But what is Vin on port 36?

  2. In the documentation it is mentioned that GPIO 21 controls the battery voltage towards pin 37 and Vext. In the sketch I do not see code to set or reset GPIO 21. Why is that?

Thanks,
Fred

I measure port 36 (Vin about 150 to 170 mV ) and 37 (Vbat, between 2000 and 2800 mV). Vbat is the battery voltage. But what is Vin on port 36?

please refer the url:


%E5%9B%BE%E7%89%87

Thanks Jason, according to this scheme it is not clear to me what is usefull for the signal on GPIO36.

Could you please also respond to my second question. Does GPIO21 , which (according to an other circuit scheme) controls Vext and the connenection of the battery with GPIO37 have a static value? I ask this because its level is not set in the battery_power example. Yet, the battery power is measured properly.

Thanks
Fred