ADC2 channel cannot be used when WiFi is in use

ADC2 is used with WiFi. Therefor analogRead() on ADC2 pins fails. ADC1 channels are save to use ⇒ GPIO32, 33, 34, 35, 36, 39.

This list is an extract of the ESP-WROOM-32 pin definition (Source) and might help to find ADC1 and ADC2 pins:

Name Function
SENSOR_VP GPIO36, SENSOR_VP, ADC_H, ADC1_CH0, RTC_GPIO0
SENSOR_VN GPIO39, SENSOR_VN, ADC1_CH3, ADC_H, RTC_GPIO3
IO34 GPIO34, ADC1_CH6, RTC_GPIO4
IO35 GPIO35, ADC1_CH7, RTC_GPIO5
IO32 GPIO32, XTAL_32K_P (32.768 kHz crystal oscillator input), ADC1_CH4, TOUCH9, RTC_GPIO9
IO33 GPIO33, XTAL_32K_N (32.768 kHz crystal oscillator output), ADC1_CH5, TOUCH8, RTC_GPIO8
IO25 GPIO25, DAC_1, ADC2_CH8, RTC_GPIO6, EMAC_RXD0
IO26 GPIO26, DAC_2, ADC2_CH9, RTC_GPIO7, EMAC_RXD1
IO27 GPIO27, ADC2_CH7, TOUCH7, RTC_GPIO17, EMAC_RX_DV
IO14 GPIO14, ADC2_CH6, TOUCH6, RTC_GPIO16, MTMS, HSPICLK, HS2_CLK, SD_CLK, EMAC_TXD2
IO12 GPIO12, ADC2_CH5, TOUCH5, RTC_GPIO15, MTDI, HSPIQ, HS2_DATA2, SD_DATA2, EMAC_TXD3
IO13 GPIO13, ADC2_CH4, TOUCH4, RTC_GPIO14, MTCK, HSPID, HS2_DATA3, SD_DATA3, EMAC_RX_ER
IO15 GPIO15, ADC2_CH3, TOUCH3, MTDO, HSPICS0, RTC_GPIO13, HS2_CMD, SD_CMD, EMAC_RXD3
IO2 GPIO2, ADC2_CH2, TOUCH2, RTC_GPIO12, HSPIWP, HS2_DATA0, SD_DATA0
IO0 GPIO0, ADC2_CH1, TOUCH1, RTC_GPIO11, CLK_OUT1, EMAC_TX_CLK
IO4 GPIO4, ADC2_CH0, TOUCH0, RTC_GPIO10, HSPIHD, HS2_DATA1, SD_DATA1, EMAC_TX_ER
Loading...
Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Leave a Reply

Your email address will not be published. Required fields are marked *

Free Link Directory