First of all, thank you!
What circuit? Quit waving your arms and post a schematic, a picture, or, at a minimum, a description of what is connected where. Post your code.
It is just a wire from 5v to pin2, which is interrupted by a plastic part.
If the plastic piece falls out, the wire isn't interrupted, so electricity can flow.
My code: http://arduino.cc/en/Tutorial/Button
I'm assuming that your piece of plastic is holding a switch open, and that removing the plastic allows the switch to close.
That's correct.
If that is correct, then one end of the switch goes to a digital pin, and the other end goes to ground.
Really?
One goes to 5v and one to pin2 (http://arduino.cc/en/Tutorial/Button)
Do I have to put the wire in another pin?
Can you give me a complete code, please?
And maybe a connecting instruction?
Thank you very much!