Current Lua downloadable firmware will be posted here

User avatar
By Rabis.49
#40679 Hi together,
I have a little bit trouble with the adc, because I try to use the adc for VDD measure. All examples that I found use a external voltage divider (with two resistor). Herehttp://nodemcu.readthedocs.org/en/dev/en/modules/adc/ I found the description for internal adc use but it doesn't work. What could be wrong?
I'm not so familiar to do this:
The default setting in the NodeMCU firmware can be controlled via user_config.h at compile time, by defining one of ESP_INIT_DATA_ENABLE_READVDD33, ESP_INIT_DATA_ENABLE_READADC or ESP_INIT_DATA_FIXED_VDD33_VALUE. To change the setting at a later date, use Espressif's flash download tool to create a new init data block.

Is anyone so clever for solve this problem. However, many thanks for reading, interest and help!
Regards
Rabis49
Attachments
Description_config.pdf
(11.66 KiB) Downloaded 257 times
ESPlorer_battery.png
ESPlorer_battery.lua
ESPlorer.png
ESPlorer.png
Flasher.png
Flasher.png
esp_init_data_default.png
esp_init_default.bin
User avatar
By grhhm
#41039 In older versions of ADC module it was limitation: the adc.readvdd33() function should be called when WIFI is disconnected only.

Practically, when it works it returns 4096 (12 bits asserted) value. It didn't measure real system voltage. My last try was about month ago. Maybe it is fixed already. I use the regular ADC input with 2 resistors, as you mentioned. This works independently of WIFI status.
User avatar
By Rabis.49
#41113 Hi,
thanks for this fundamental answer. I could believe that - what a mistake (also in documentation).
Well, so I try the "old fashion" method with resistors - it's a pity.

Kind regards
Rabis49