Introduction: Arduino Door Alarm With Keypad

Picture of Arduino Door Alarm With Keypad

In this project we gonna make a door alarm in the second part I added a keypad to disable the alarm.

Step 1: Watch My Video

Step 2: Parts You Need

  • Buzzer
  • Reed switch
  • Magnet
  • Arduino


  • Keypad

Step 3: First Code (without Keypad)

This code is just a modified version of the button example sketch:

const int buttonPin = 2; // the number of the reedswitch
const int ledPin = 13; // the number of the buzzer

// variables will change:

int buttonState = 0; // variable for reading the pushbutton status

void setup() {


pinMode(ledPin, OUTPUT);

pinMode(buttonPin, INPUT);


void loop() {

buttonState = digitalRead(buttonPin);

if (buttonState == HIGH) {

digitalWrite(ledPin, HIGH); }


Step 4: Second Code

Step 5: Subscribe

Picture of Subscribe

If you want to view more off my projects you can subscribe to my YouTube channel! Just click on this link:


frszddin93 (author)2017-12-15

how you make the reed switch stick to the other?

About This Instructable



Bio: TechMaker is a channel loaded with awesome Electronics Tutorials, Projects and How To´s using Arduino's
More by TechMaker_TM:Arduino Weather Station || DHT 11Arduino door alarm with keypadArduino realtime clock using ds1302
Add instructable to: