NodeMCU : Input pullup in A0 I am trying to port a simple project I have working in an Arduino UNO to a NodeMCU but I am stuck as I am using the analog gpio to receive the input from some buttons, I am always getting always low values (between 0 and 5) while in the working arduino sketch I get values from 0 to 1023.

I have tried deactivating the wifi while trying to retrieve the values, but I got no luck trying that, as I have read that sometimes the NodeMCU A0 gpio malfunctions when the wifi is not sleeping.

I am setting up the gpio in the setup method like this:

void setup(void){
    pinMode(sensorPin, INPUT_PULLUP);  
    ...


And my sensorPin variable is declared in the beginning of the sketch

int sensorPin = A0; 


Any ideas why when I read the value in the NodeMCU I don't get the same behaviour as in an Arduino board?
As stated by Majenko in the comments, I thought that all MCUs analog gpios had a pullup resistor built in, so I have been able to solve the problem using an external pullup, in this case connecting a 10K resistor like in the diagram: 

 . 

Special thanks to Majenko for his time and patience. Cheers!