I am using a reed switch as a part of a tipping bucket rain gauge project, i.e. the bucket has a magnet that opens to switch as it passes registering a volume of rain fall.
I have connected one end of the reed switch to digital pin 13 and the other to ground using only hook-up wire. The reading are, shall we say temperamental, i.e. the switch normally works but some times stays open and sometimes switches for seemingly no good reason.
Am I missing some vital electronics? or is this simply a cheap / broken switch?
The switch is a Spark Fun COM-08642. I have included a 10ms delay in my sketch between loops.