Magnetic contact switch (door sensor): This sensor is essentially a reed switch, encased in an ABS plastic shell. Normally the reed is ‘open’ (no connection between the two wires). The other half is a magnet. When the magnet is less than 13mm (0.5″) away, the reed switch closes.
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!