Electrical – Does nodemcu/arduino require a current limiting resistor when connecting input pin to VCC

#nodemcuarduino

The question says it all – I want to connect (possibly) VCC (e.g. via a pushbutton) to an NodeMCU input pin, and read the value (to see if the pushbutton is depressed).

If you connect VCC to ground-level (with no resistor), too much current will flow, and you risk (almost certain) damage to your board.

Does this apply to input pins?

If "sometimes", when? Is the answer the same for Arduino/Atmel? For other chips?

Best Answer

No, it should not. The input for the GPIO pins are high impedance and you can tie them to VCC (3.3V Not 5V) or Gnd without issue. If you are trying to switch the input with a push button though, you need to switch between one state to the other. A pull up or pull down is used to set the default state, while being weak enough that it can be overridden when switching to the second state, and preventing a direct short.

Note that an input is a 3rd state, High-Z, not a direct connect to ground or vcc. This is fairly standard between different micro controllers.