PIR Sensor with Arduino Projects

Thanks for Visiting here

Print Friendly and PDF

PIR Sensor with Arduino Projects

PIR  SENSOR : passive infrared sensor

A passive infrared sensor (PIR sensor) is an electronic sensor that measures infrared (IR) light radiating from objects in its field of view. They are most often used in PIR-based motion detectors. PIR sensors are commonly used in security alarms and automatic lighting applications.
PIR SENSOR


Wiring of PIR sensor with arduino uno

Pir Sensor wiring with Arduino uno


PIR SENSOR 

ARDUINO 

GND 

GND 

POWER 

+5v 

SIGNAL 

3 



BUZZER 

Arduino 

GND 

GND 

POWER 

13 

Code : 
#define pir 3
#define buzz 13
void setup()
{
  pinMode(pir,INPUT);
  Serial.begin(9600);
  pinMode(buzz,OUTPUT);
 
}
void loop()
{

  int value = digitalRead(pir);
  Serial.println(value);
  delay(600);
  if(value==1)
  {
    digitalWrite(buzz,HIGH);
  }
  else
  {
    digitalWrite(buzz,LOW);
  }
}

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.