PIR sensor with and without arduino

Hello guys
here you can see how interface PIR sensor with and without arduino board.

use of this sensor is very easy , by connecting some wires as shown in diagram you can use this sensor.


here is circuit diagram :-





























After connection as per diagram you need to upload this simple code :-

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

#define pir 10
#define op 13
int val;

void setup() {
  pinMode(pir, INPUT);
  pinMode(op, OUTPUT);
}

void loop() {
  val = digitalRead(pir);
  if(val == HIGH) {
    digitalWrite(op, HIGH);
  }
  else {
    digitalWrite(op, LOW);
  }
}

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
thank you for watching our video.
for more updates SUBSCRIBE now
https://www.youtube.com/channel/UCY6KA8oFk1s36fyPiFEmedQ


Comments

Popular posts from this blog

OLED display interface with Arduino

Binary Clock

timer switch