I want a sensor that will detect proximity (closeness to the sensor) but also direction left to right. I will have the sensor setup where people will be walking by and then walking back. I want the sensor to trigger an action when the people are walking past it on the way IN (they will be moving right to left across it). I then have an action to entice them to stop and then walk towards the sensor. Then I need to use distance sensing to see if they are coming towards the sensor or ignore me and start walking away. The idea is to change the action to get them to come right to the sensor. Once they have stood still in front of the sensor to see the final action, the people continue walking in, but then walk OUT 30 seconds later right past the sensor. I don't want it to trigger again to the same people walking OUT, only those walking IN. Can I do this with one sensor, or do I need two? Which sensor(s). The sensor needs to detect motion to 15', then know when the person is standing still 1 foot or less in front of the sensor. Thanks!
Have you considered multiple sensors? (array)
might make it "easier" to detect direction but it will still be difficult. Especially when multiple people are passing in parallel ...
Sorry, I'll give you more detail. This is a Halloween project. I want to have this on the grass at the edge of my driveway. Kids and parents, usually 2 to 6 people in a group, will walk past. Some might go to the box I have wondering what it is, others my pass and go right towards the door. So there will be a random "idle mode" where it just moans and cries of for help with several wave files on a wave shield. When it senses movement across it towards the house, it will beckon them to come closer. If they do, it will keep checking that the last distance is less than the previous disctance until they get within a foot or so. If they move away before the final action is triggered, then it changes the wave file to call them back. So it is an "intelligent" talking system. Once they have gotten the scare at the end, the box resets and they go away. It then ignores them walking back in the other direction. If other kids come after it resets, it triggers the sequence again. Thanks for the help.
Maybe I should just keep it simple for now and use one sensor and just sense proximity and getting closer or moving farther away and ignore direction. I could also have a longer reset time where it does nothing before going back into "help me" mode. I am N4IXL, btw.