I'm building the Arduino spaceship interface from the project book and everything works fine. It involved connecting 3 Arduino outputs to 3 leds, and 1 Arduino input to the a switch. For a photo of the setup, please see here: http://imm.io/V5oh
The switch is set up like this: 5V ---- push button-----10kOhms------0V
The Arduino input is connected between the push button and the 10kOhm resistor.
My question is: Why is the 10kOhm resistor needed? The manual says it is needed so that the Arduino "reads LOW when there is now voltage coming in through the switch".
Could I not simply get rid of the resistor completely (just replace it with a wire), then if the switch is open, it will still be connected to the ground and still read LOW? What is the resistor actually doing, if anything?