Muhammad_Munir
Published © GPL3+

Automate Light with PIR sensor

Automate Light with PIR sensor Using Arduino

IntermediateFull instructions provided6,338
Automate Light with PIR sensor

Things used in this project

Hardware components

Arduino UNO
Arduino 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
79 projects • 51 followers
I am Arduino programmer, also expertise in ESP32 and 8266 wifi modules.
Contact

Comments

Please log in or sign up to comment.