test defined as UInt
ADC.Initialize(ADC.A0, ADC.MODE_INPUT)
test=ADC.AnalogRead
log(test)
gives 65535 (-1)
#if C
ADC_MODE(ADC_VCC);
void GetVCC (B4R::Object* o) {
b4r_main::_vccx = system_adc_read();
}
#End if
vccx reads the same 65535
but
#if C
ADC_MODE(ADC_VCC);
void GetVCC (B4R::Object* o) {
b4r_main::_vcc = ESP.getVcc();
}
#End if
vcc reads different values accoreding to the A0 input - and the results are 0<vcc<3040
What I am doing wrong?
I am usind this
https://github.com/nodemcu/nodemcu-devkit-v1.0 board
I know that A0 connected to a resistor devider - and that the range of the input of the Esp8266 is from 0V to 1V and that the development board input range if from 0V to 3.3V... But my question is what I am doing wrong as a software.