I forgot to mention that I a beginner
If I understand correctly, what you're suggesting is to connect:
5v -> resistor (10K?) -> pin1
input -> pin2 (pullup resistor enabled)
ground -> pin3
Is that correct? I'm not sure of the order of the pins, is there a standard?