Here is the code that was written for this project. It takes an input from a Reed Sensor that is set high by the removal of a magnet. In turn, this causes the screen to turn on (as a visual output), a Piezo Buzzer to ‘alarm’ (via Pulse Modulation as an auditory output), and then accepts a ‘code’ from the keypad in order to disable the signal. Regrettable the keypad only appears to work sometimes, whether as a result of incomplete coding, or through the keypad itself being faulty. The keypad input is checked against a code that is existing as a character string, and then this in turn turns off the LCD and resets the alarm system after a delay to allow the magnet to be placed on the reed sensor once again. This could be used as a simple alarmed door system with a keyed disable.