Page 1 of 1

Can I use the input-only pins to connect to a pushbutton without a resistor?

Posted: Mon Jul 12, 2021 6:56 pm
by cal237
On ESP32 the last GPIO pins are input-only and it says they have no software pullup or pulldown resistors. Can I still use them to connect to pushbuttons in the way that is described at https://www.instructables.com/Arduino-B ... -resistor/ (That is, without any external resistor, connecting the button straight to ground)?

I want to connect the buttons this way because it is much easier and only requires 2 wires, as opposed to https://microcontrollerslab.com/push-bu ... h%20state. this version, which requires a resistor and extra wires for each button.

Re: Can I use the input-only pins to connect to a pushbutton without a resistor?

Posted: Tue Jul 13, 2021 3:43 am
by ESP_Sprite
No. If the button is not pressed and there is no pull-up, the pin will be picking up all kinds of random signals and the level you read will be random/undefined.

Re: Can I use the input-only pins to connect to a pushbutton without a resistor?

Posted: Sat Jul 31, 2021 1:25 pm
by cal237
Ok, so I need to implement my own pull-up/pull-down as shown in the 2nd link if I want to use those pins. Thanks for your help!