So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By lesept
#68266 OK, I'm a noob. This is said. And also not native english speaker.
I have a NodeMCU 0.9 that I program using the Arduino IDE. I try to read a voltage using the ADC, but it doesn't work.

I connect a potentiometer between 3V3, GND and the A0 pin, and use this program:

Code: Select allADC_MODE(ADC_VCC);
int val = 0;

void setup() {
  Serial.begin(9600);
}

void loop() {
  val = analogRead(A0);
  Serial.println(val);
}


All I get on the console is 65536, whatever the value of the resistor. What's going wrong?
Thanks for your help. :mrgreen: