There are 4 pir and 1 servo motor and each pir has its own degree. when a pir detect the motion then servo motor rotates to degree of motion but this pir returns to its degree as triggered after the servo motor return to starting point. servo motor makes this situation 2 or 3 times.
is the problem about connection or codes ?
#include <Servo.h>
Servo myservo;
int pin1 = 2;
int pin2 = 4;
int pin3 = 11;
int pos = 0;
int pin4 = 6;
int wait = 1000;
(not sure if I fully understand what yot mean..)
I guess part of problem is that when triggered, the PIRs keep their high output for several seconds.
Your code should change order when reading, so all sensors are treated equally
When a PIR is triggered… Have you measured the time it keeps its output high?
(on most sensors, this time can be set by user)
If possible, set the sensor to NOT retriggable
knut_ny:
When a PIR is triggered.. Have you measured the time it keeps its output high?
(on most sensors, this time can be set by user)
If possible, set the sensor to NOT retriggable
I do not count the time while pir's output high.
Do you mention potentiometer while taking about setting the time?
I do not know what you wanted to tell with this sentence "If possible, set the sensor to NOT retriggable"
I would be happy and glad if you can explain all these points bro.