Connecting motion sensor to Arduino

Hello out there:

I am working on a soundscape for an art project have the following parts:

--- Arduino Uno

---- WAV Trigger

[ https://www.sparkfun.com/products/13660 ]

PIR Motion Sensor (JST) [ https://www.sparkfun.com/products/13285 ]

I plan to affix these boards to my sculptors and have (a single) sound play when someone is near to the object, and then end the sound after a predetermined period of time when no motion is selected.

Any ideas on how to get start with the process, the coding.

I am a novice -- at best.

Thanks!

giraud

Here is an example of how I would like the code to look in plain english.

If (sound is not playing) on detecting motion Play sound

if (sound is playing) do not play sound (meaning initial sound continues to play)

if (no motion is detected for 20 seconds after the end of sound) (stop playing sound –– meaning do not repeat sound)

else (if motion is detected after the sound has ended for up to 20 second) repeat sound

And so on...

Despite receiving good advice from a number of people, you deserted your last thread and didn't even bother to go back and thank any of those that helped, or even acknowledge the fact that they'd replied in an effort to try to help you. That's very bad manners where I come from. :(

If you want to detect when a person is "near" and not "moving past" I would suggest the HC-SR04 sonar sensors You can get them for about $2 each. That would allow you to continue to play the sound as long as someone was near, even if they were not moving. The PIR sensor will stop triggering if the warm object is not moving, even if it is near.

Thank you John. I will take your suggestion.