-->
Page 2 of 3

Re: Internal system voltage of ESP-01 for low battery warnin

PostPosted: Sat Sep 18, 2021 12:04 pm
by EyC
You need to activate the PHY layer first. In my experience, if you don't do it, the ADC_READ_VDD_MODE will always read 4466.

Just include "esp_wifi.h" and add these three lines at the start of app_main():

Code: Select allESP_ERROR_CHECK(esp_event_loop_create_default());
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );


After that, in the monitor, you should see something like this:

phy_version: 1163.0, 665d56c, Jun 24 2020, 10:00:08, RTOS new
I (410) phy_init: phy ver: 1163_0


Also remember to comment out the adc_read_fast block, since it is not suitable for Vcc mode.

Re: Internal system voltage of ESP-01 for low battery warnin

PostPosted: Sun Sep 19, 2021 9:14 am
by eriksl
My SDK doesn't have that function. Maybe not everybody is using RTOS... (or Arduino...)

Re: Internal system voltage of ESP-01 for low battery warnin

PostPosted: Sun Sep 19, 2021 2:58 pm
by EyC
Which function?

Original poster clearly states he is using the ESP8266_RTOS_SDK v3.4.. Specifically the adc example project from the peripherals section of the SDK installation.

The function app_main() is part of adc_example_main.c. The wifi related functions are part of that SDK components.

Re: Internal system voltage of ESP-01 for low battery warnin

PostPosted: Tue Sep 21, 2021 12:45 pm
by eriksl
Yep true and correct. Excuse me.