[SOLVED] Read analog from GPIO

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

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

https://www.arduino.cc/en/Reference/AnalogRead

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

http://www.futureelectronics.com/en/analog/multiplexer-demultiplexer.aspx

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
http://s.aliexpress.com/RzQjER7b
(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
:rose:

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.

Regards

1 Like

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

https://www.aliexpress.com/item/I2C-ADS1115-16-Bit-ADC-4-channel-Module-with-Programmable-Gain-Amplifier-2-0V-to-5/32674556200.html

2 Likes

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

You will soon :stuck_out_tongue:

1 Like