Page 1 of 1

ESP32 PullUp- PullDown

Posted: Sat Jul 06, 2019 3:15 pm
by ats3788
Hallo
How can I switch on the PullUp- PullDown Resistors in the Arduino IDE

Re: ESP32 PullUp- PullDown

Posted: Sun Jul 07, 2019 7:48 am
by fivdiAtESP32
When calling the pinMode function specify mode INPUT_PULLUP to enable the internal pullup resistor or specify mode INPUT_PULLDOWN to enable the internal pulldown resistor.

For example, to enable the pullup resistor for GPIO17 do this:

Code: Select all

pinMode(17, INPUT_PULLUP);
To enable the pulldown resistor for GPIO17 do this:

Code: Select all

pinMode(17, INPUT_PULLDOWN);
Note that not all GPIOs on an ESP32 have pullup and pulldown resistors.

Re: ESP32 PullUp- PullDown

Posted: Mon Jul 08, 2019 12:16 pm
by ats3788
Thank you very much !!!!!