My PIR sensor is not Working with Arduino uno and Nano. But it is Working Normally when we connect the sensor without Arduino it is working well. When we are connected to Arduino it always shows the high Value the value is not changing.
// code is
const int sensor = 2;
void setup() {
pinMode(sensor, INPUT);
Serial.begin(9600);
}
void loop() {
int value = digitalRead(sensor);
if (value == 1) {
Serial.println(value);
delay(2000);
}
else {
Serial.println(value);
delay(2000);
}
}