A good practice is to take the issue apart and verify each of the items. In this case, go after the analog read first as you try to get going in your NodeMCU v3 - analogRead() conversation.
Furthermore, from reading the data / spec sheet of ESP8266 (and NodeMCU), only voltage values from 0..1.0V are valid inputs for analog read on pin A0.
Reading with an open input or with a voltage outside the specified range - as 3.3V over 4k7 Ohm - are meaningless... and values above 3.3V or below (usually) -0.3V - relative to GND - just destroy the MCU... and you do not even see a smoke anymore...
© Espruino, powered by microcosm.
Report a problem