Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Akshayan Sinha
Published © GPL3+

Contactless Door Bell (Covid-19 Special)

Based on the pandemic of Covid-19, a Doorbell that needs only a wave of hand to ring it.

BeginnerFull instructions provided1 hour995
Contactless Door Bell (Covid-19 Special)

Things used in this project

Story

Read more

Schematics

Doorbell Circuit Diagram

Code

Arduino Code

Arduino
int IR;



void setup() {
  pinMode(13,INPUT);
  pinMode(4, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);

}

void loop() {
 IR = digitalRead(13);

 if (IR == HIGH){
  digitalWrite(6, HIGH);
  delay(500);
  
  IR = digitalRead(13);
  
  if (IR == HIGH){
    digitalWrite(7, HIGH);
    delay(500);
    IR = digitalRead(13);
    
    if (IR == HIGH){
      digitalWrite(8, HIGH);
      delay(500);
      digitalWrite(4, HIGH);
      delay(500);
      digitalWrite(4, LOW);
      digitalWrite(6, LOW);
      digitalWrite(7, LOW);
      digitalWrite(8, LOW);
    }
    else if (IR == LOW){
      digitalWrite(6,LOW);
      digitalWrite(7,LOW);
      return 0;
    }  
  }
  else if (IR == LOW){
    digitalWrite(6,LOW);
    return 0;
  }
 }
}

Credits

Akshayan Sinha
28 projects • 28 followers
Robotics Software Engineer with a makermind.
Contact

Comments

Please log in or sign up to comment.