Muhammad_Munir
Published © GPL3+

Automate Light with PIR sensor

Automate Light with PIR sensor Using Arduino

IntermediateFull instructions provided58
Automate Light with PIR sensor

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
PIR Sensor, 7 m
PIR Sensor, 7 m
×1
Relay (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
BD139 Transistor
×1
2.2k Resistor
×1
Breadboard (generic)
Breadboard (generic)
×1

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Code

Code

Arduino
void setup()
{
  
pinMode(11,OUTPUT);
pinMode(7,INPUT);
delay(500);
}

void loop()
{

if(digitalRead(7)==HIGH)
{
 
  digitalWrite(11,HIGH);
  delay(3000);
  digitalWrite(11,LOW);

  }
  
  
  }

Credits

Muhammad_Munir

Muhammad_Munir

1 project • 2 followers

Comments