Re: system_adc_read_fast() always give 1024 as output
Posted: Sat Jan 13, 2018 10:04 am
That is probably because it is reading the VCC not the A0.
Quote from https://github.com/nodemcu/nodemcu-firm ... les/adc.md
In ArduinoESP framework, we simply have to add globally the command "ADC_MODE(ADC_TOUT)".
Quote from https://github.com/nodemcu/nodemcu-firm ... les/adc.md
Depending on the setting in the "esp init data" (byte 107) one can either use the ADC to read an external voltage, or to read the system voltage (vdd33), but not both.
In ArduinoESP framework, we simply have to add globally the command "ADC_MODE(ADC_TOUT)".