Rayan kiwan
Created September 11, 2022 © CERN-OHL

Arduino Door bell project

In this tutorial, I will show you how to make Arduino door bell using push button and LED

BeginnerFull instructions provided25
Arduino Door bell project

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Pushbutton Switch, Pushbutton
Pushbutton Switch, Pushbutton
×1
LED (generic)
LED (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1
Buzzer
Buzzer
×1
Resistor 1k ohm
Resistor 1k ohm
×2

Software apps and online services

Arduino IDE
Arduino IDE

Schematics

Arduino doorbell

Code

doorbell

Arduino
// C++ code
//
int led = 4;
int button =2;
int buzzer =3;

void setup()
{
  pinMode(led, OUTPUT);
  pinMode (buzzer, OUTPUT);
  pinMode(button, INPUT);
  
}

void loop()
{
 int a =digitalRead(2);
  if(a==1){
    digitalWrite(led, HIGH);
    digitalWrite(buzzer, HIGH);
}
  else{
    digitalWrite(led, LOW);
    digitalWrite(buzzer, LOW);
}
}
    

Credits

Rayan kiwan
36 projects • 2 followers
Contact

Comments

Please log in or sign up to comment.