Introduction: Arduino Door Alarm With Keypad

About: TechMaker is a channel loaded with awesome Electronics Tutorials, Projects and How To´s using Arduino's

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

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