Arduino Door Alarm With Keypad

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

Optional:

  • 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() {

delay(5000);

pinMode(ledPin, OUTPUT);

pinMode(buttonPin, INPUT);

}

void loop() {

buttonState = digitalRead(buttonPin);

if (buttonState == HIGH) {

digitalWrite(ledPin, HIGH); }

}

Step 4: Second Code

http://bit.ly/keypaddooralarm

Step 5: Subscribe

If you want to view more off my projects you can subscribe to my YouTube channel! Just click on this link: http://bit.ly/1WIMuNx

Share

    Recommendations

    • Creative Misuse Contest

      Creative Misuse Contest
    • Metalworking Contest

      Metalworking Contest
    • Tiny Home Contest

      Tiny Home Contest

    2 Discussions

    0
    None
    Kamyk

    5 months ago

    Hi. Could you post a scheme? Thank you!

    how you make the reed switch stick to the other?