How to simulate PIR sensor using arduino uno in proteus ISIS professional:
Here I have show you how to use pir sensor in proteus ISIS professional
A passive infrared sensor (PIR sensor) is an electronic sensor
COMPONENTS:
- Arduino uno
- LED green
- Pir sensor
- Resistor
- Virtual terminal
CONDITIONS:
- Pir value HIGH - Blinking Green LED
- Pir value LOW - Not Blinking
It will show output value in virtual terminal (Motion detects or Motion not detects)
PIR SENSOR |
PIR SENSOR CODING USING ARDUINO IDE
#define pir_Pin 13
int pir_value;
void setup() {
Serial.begin(9600); // Initializing Serial Port
pinMode(2,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
pir_value = digitalRead(pir_Pin);
Serial.print(pir_value);
if(pir_value == HIGH){
digitalWrite(2,HIGH);
Serial.print("Motion deducted");
}
else{
digitalWrite(2,LOW);
Serial.print("Not deducted");
}
delay(1000);
}
No comments:
Post a Comment