Electronic Brick - Magnetic Sensor Switch
This brick contains a dry reed switch in a standard pull-up resistor configuration. The 3 pins are GROUND, Vcc (5VDC), and SIGNAL. The SIGNAL is connected to any Arduino digital input. If magnetic field is present the SIGNAL is changed from HIGH to LOW.