Hi,
I have a ESP-WROM-02 and I would read a ADC signal.
On the datasheat I read that it is possible only read from the TOUT pin!
I found an example in C language that use "system_adc_read" function.
On micropython for read from an ADC input I use "machine.ADC(<IO>)" but in this case I don't know the name (or number) for the TOUT pin.
Does anyone know how I can do it?
Thank you
ESP-WROM-02 Read from TOUT ADC
Re: ESP-WROM-02 Read from TOUT ADC
Hi,
machine.ADC takes a channel number, not a pin. On ESP8266, channel 0 is the ADC pin, channel 1 is VDD33.
https://docs.micropython.org/en/latest/ ... l/adc.html
machine.ADC takes a channel number, not a pin. On ESP8266, channel 0 is the ADC pin, channel 1 is VDD33.
https://docs.micropython.org/en/latest/ ... l/adc.html
Re: ESP-WROM-02 Read from TOUT ADC
Hi jimmo,
I tried with ADC(0) and work fine!
I just have to be careful because this input only accepts values ranging from 0v to 1v!
Thank you
I tried with ADC(0) and work fine!
I just have to be careful because this input only accepts values ranging from 0v to 1v!
Thank you
Re: ESP-WROM-02 Read from TOUT ADC
Yup. As the doc says though, a pair of resistors (in a voltage divider) will let you use anything you want.