whats the difference between pullup and pulldown

help me control a led with a button
2 Replies
Toph
Toph4w ago
one just ► "pulls" the GPIO pin "up" to logic voltage (5V on an UNO/NANO) which keeps it HIGH until the button is pressed while the other simply ► "pulls" the pin "down" to ground/GND which keeps it LOW until your button is pressed. ☝️ this prevents the pin from "floating" (just hanging there which could read as HIGH or LOW depending on environmental factors) ... so without the pullup or pulldown resistor, you'll get some "ghost" readings (your code will think the button was pressed even if it wasn't) ... 🤓 for more information (another explanation) see: ► https://discord.com/channels/420594746990526466/451158319361556491/1404422094409826365https://www.instructables.com/Understanding-the-Pull-up-Resistor-With-Arduino/
Pranav
PranavOP4w ago
huh

Did you find this page helpful?