Skip navigation
Button pressed or not: why does a pin need a resistor? 🤔
0:00

Button pressed or not: why does a pin need a resistor? 🤔

#arduino #electronics #microcontroller

Button pressed or not: why does a pin need a resistor? 🤔 An input pin connected to nothing is “floating”. Its impedance is so high that it picks up noise, its voltage drifts anywhere between 0 V and 5 V, and the reading becomes unpredictable. A pull-up resistor from 5 V to the pin fixes it: ✅ Released: pin reads HIGH ✅ Pressed: pin reads LOW (active-low) ✅ Current is limited: 5 V / 10 kΩ = 0.5 mA. Without the resistor, pressing would connect 5 V straight to ground (a short circuit). On Arduino, just use the built-in pull-up: pinMode(pin, INPUT_PULLUP); Values shown are illustrative. #arduino #electronics #microcontroller #pullup #learnelectronics

Comments

Comments from the original post on Instagram

No comments yet