Go Down

Topic: ESP32 output voltage on input pin (Read 1 time) previous topic - next topic


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:

Code: [Select]
void setup() {

void loop() {


Since you mention Heltec, I assume you are using either the Wifikit32 or the WifiLoRa32. On both of these boards GPIO4 is the SDA line for the onboard OLED, and it has a hardware pullup resistor.

Go Up