Robodia Technology
Published

Entry Level Door Monitoring Alarm System

A decent and very cheap office entrance door alarm system to keep track of every person's entry or departure.

IntermediateFull instructions provided2 hours12,180
Entry Level Door Monitoring Alarm System

Things used in this project

Story

Read more

Schematics

Frtzing Schematics

Code

Ultrasonic sensor with arduino

Arduino
int tiger=2;
int echo=3;
int a=12;
int Duration,Distance;
void setup()
{
  pinMode(tiger,OUTPUT);
  pinMode(echo,INPUT);
  Serial.begin(9600);
  pinMode(a,OUTPUT);
}
void loop()
{
  digitalWrite(tiger,HIGH);
  delayMicroseconds(1000);
  digitalWrite(tiger,LOW);
  Duration=pulseIn(echo,HIGH);
  Distance=(Duration/2)/29.1;
  Serial.print("cm=");
  Serial.print(Distance);
  delay(500);
  if (Distance<50)
  {
   digitalWrite(a,HIGH);
   delay(1000);
    }
 else 
 digitalWrite(a,LOW);
  delay(200);
  
}

Credits

Robodia Technology
3 projects • 69 followers
At its core, Robodia Technology Solutions is an electronics lab focusing on various exciting new technologies benefitting from the thriving open source hardware
Contact

Comments

Please log in or sign up to comment.