Sketch runs when input touched

With this sketch uploaded and tested, touching the wire attached to pin 2 causes the sketch to run as if the buttonState == LOW.

Please note:

  1. I'm real new!
  2. The Uno board does not have an earth/electrical ground.
  3. I replaced the board.
  4. Wasn't sure to post this inquiry in this catergory.
    Thanks

HFD_siren_5_seconds_060912.ino (1.84 KB)

If the button is attached from pin 2 to ground, the resistor should go from pin 2 to +5V (Vcc). The code says:

 The circuit:
 * pin 13 to siren 
 * plectron to pin 2 from ground
 * 10K resistor attached to pin 2 from ground

(I'm not sure what a plectron is.)

Which says zip about how it's supposed to wired to the Arduino.

Obviously something is supposed to keep pin 2 HIGH except for triggering the alarm and "touching the wire" is making pin 2 go LOW.

If an input is not held to HIGH (+5V) or LOW (GND) it will "float" and be responsive to minuscule changes. Random electrical or radio noise - or touching the wire - can change the state of the input.