Hi dear friends!
I need you help, but I suppose you will escape from here after reading my question.
I need following:
When an IR sensor (HC-SR501) detect for 3 times (in 20 seconds) a movement, it has to activate an ultrasonic distance sensor (HC-SR04).
This ultrasonic sensor must measure distance: if distance is more than X centimeters, it has to make nothing, but if distance decrease under X centimeters, it has to activate a 5V DC relais/relé until distance grove above X centimeters again.
I know this is not a simple question, and probably it requires a lot of work.
Thank you very much indeed in advance to all people would like to help me.