Hi, I'm working on an ESP32 (Heltec) project and i'm facing this issue with GPIO4: when I set it as output it works fine but when I set it as input there's 3.3V on this pin, I need to read the voltage with analogRead() and the 3.3V of this pin change the real value. It seems like there's an internal pull-up resistor enabled.
Here's my easy code:
void setup() {
Serial.begin(9600);
pinMode(4,INPUT);
}
void loop() {
Serial.println(analogRead(4));
delay(1000);
}