I made a small circuit that when someone push a button a servo rotates to 90° and go back to his initial position after a certain amount of time.
My issue was with the resistor. I needed it to be in a particular position for my small project to work, which confuses me because in the small inner circuit (ground → resistor → input pin → button → source) I thought it was a good idea to get rid of what seem at first a useless cable, so I removed the cable that connects the button to the source and placed the resistor. I connected the input pin directly to the button, but it did not work as I expected.
To make things clearer, I made a picture of the circuit in a different shape.
I learned that in a circuit the position of the resistor has no impact (Ohm's law).
Why is it like this?
PS: The picture of my Arduino breadboard.