Door Ajar Alarm Circuit

SRJT06302

Jugaadu met one of his old friend- Arjun. Jugaadu finds out that his pet- Bruno has left the house as the door was left open. Arjun has to search for his pet every time. Even earlier his pet tried getting outside the house many times. Arjun was tired of it and he wanted Jugaadu to help him. Jugaadu is making a system for the door to resolving this issue?

Bag Items:

  1. Foam sheet
  2. Arduino UNO
  3. Buzzer
  4. IR sensor
  5. Glue gun
  6. USB Cable
  7. Battery and DC Jack
  8. Cutter
  9. Jumper Wires
We can make an Arduino UNO and IR based system which will be fixed at minimal height on the door. Whenever the pet will try to escape from the open door, IR sensors will sense the obstacle and will ring the buzzer immediately.

    int out = 8; 
int led= 11; 
void setup() { 
// put your setup code here, to run once: 
pinMode(out,INPUT); 
Serial.begin(9600); 
pinMode(led,OUTPUT); 

} 
void loop() { 
// put your main code here, to run repeatedly: 
if(digitalRead(out)==LOW){ 
digitalWrite(led,HIGH); 
}else{ 
digitalWrite(led,LOW); 
} }