Chat freely about anything...
User avatar
By martinayotte
#73118 That is probably because it is reading the VCC not the A0.

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)".
User avatar
By yourbro
#73125 Adding "ADC_MODE(ADC_TOUT);" at the top of sketch doesn't help.

system_adc_read_fast() still always returns 1024. And, system_adc_read() continues to return correct values as before.

Might there be a fault in the implementation of system_adc_read_fast() in the ESP8266_NONOS_SDK?