[SOLVED] Read analog from GPIO

Hi friends. is it possible to read analog data from GPIO on nodemcu? is there any example ?

the esp8266 has one single analog pin.
you can read it directly anytime with the AnalogRead(); command.


or, if you need to read directly from app, just create a display widget and select the analog pin, instead of virtual. thats all.

1 Like

No. I need read multiple device analog ( MQ sensors ) in one nodemcu

not possible.
you will need a different mcu with more analog pins, or an analog demux


1 Like

thanks for reply. can I use arduino pro micro with esp8266 shield ? the arduino micro pro has 4 analog pin

yes, that should work. or you can try the updated version of arduino nano by robodyn, the black ones. find on ali.

Nano V3 ATmega328/CH340G, Micro USB, Pin headers NOT soldered. Compatible for Arduino Nano V3.0
(from AliExpress Android)

1 Like

thanks you helped me :rose:

i updated post, please check it

1 Like

thanks. I bought arduino pro micro + esp01 and build my own wifi shield. all analog pins worked perfectly

1 Like

Keep in mind now, you are using the OLD arduino as the main processor and the ESP “only” as Wi-Fi adapter…
This duo will work for sure but… The ESP8266 is more powerful than the Arduino, if I were you, I would consider the use of the ESP as the main processor.


1 Like

+1 … and if you need more ADC… then its only $2 away.



Oh… I didn’t realise that… what a silly design decision :confounded:

You will soon :stuck_out_tongue:

1 Like