I’m relative newbie to Arduino programming, but have a programing background. I’m trying to combine 2 sketches. One to gather Temp, Humidity and pressure from a BME280 sensor. The second is to read DC voltage through one of the ADC2 pins. The 2 individual sketches work fine on their own. When the 2 sketches are combined, the analogRead command always reads 4096 regardless whether connected to a power or not. Is what I’m trying to do possible? if so, what am I doing wrong?
Does your project use WIFi? Because there is a known pbm on the ADC2 pins when used in conjunction with WiFi:
As a reminder, here is a list of pins to consider:
Rui and Sara also reference a pin map of the WROOM-32 module:
As well as a declination on the DoIt ESP32 DevKit v1:
Hopefully that’s where your problem lies.
Yes, my sketch does have a wifi component. And yes, using one of ADC1 pins worked. Thanks for your help.