system
June 11, 2012, 2:15am
1
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:
I'm real new!
The Uno board does not have an earth/electrical ground.
I replaced the board.
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.)
A Plectron is a specialized VHF/UHF single-channel, emergency alerting radio receiver, used to activate emergency response personnel, and disaster warning systems. Manufactured from the late 1950s, through the late 1990s, by the now defunct Plectron Corporation in Overton, Nebraska, hundreds of thousands of these radios were placed in homes of first responders across all of North America. This included ambulance crews, full-time and volunteer firefighters, off-duty specialized police response tea...
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.
system
June 11, 2012, 6:55am
4
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.