Hi. I am new here. Currently I am designing a people counter using PIR sensor and arduino uno. This is how the counter should work;
The counter will be installed on the wall of hallway. When a person passes through the hallway in front of the counter;
while pirPin high (motion detected):
1) ledPin high (an LED will light up)
2) the number of people counted will increment
3) 2 seconds delay
if pirPin low (no motion detected):
1) ledPin low (an LED will turn off)
2) 0.05 second delay
I found the code for this project online and edited it for how I would like it to work, and it did work.
However, I noticed that after sensing one movement (person), the PIR sensor took about 7 seconds before it was able to sense the next one.
My question is, is that the normal behavior of PIR sensor (having a 7 seconds delay after a motion is detected)? If it is not normal, can anyone please check the code (will be shared after reply)?
Thank you.
The counter will be installed on the wall of hallway. When a person passes through the hallway in front of the counter;
while pirPin high (motion detected):
1) ledPin high (an LED will light up)
2) the number of people counted will increment
3) 2 seconds delay
if pirPin low (no motion detected):
1) ledPin low (an LED will turn off)
2) 0.05 second delay
I found the code for this project online and edited it for how I would like it to work, and it did work.
However, I noticed that after sensing one movement (person), the PIR sensor took about 7 seconds before it was able to sense the next one.
My question is, is that the normal behavior of PIR sensor (having a 7 seconds delay after a motion is detected)? If it is not normal, can anyone please check the code (will be shared after reply)?
Thank you.