PIR motion sensor wid speaker

im newbie wid arduino.

this is a project i want to create.

i have a PIR motion sensor with arduino

i would like the sensor to react by the speaker.
ex: wen the sensor detect movement. the speaker will make noise.
the closer the object to sensor. the louder speaker is.

pls help me.

thanks in advance

mary

see:-
http://www.arduino.cc/playground/Main/InterfacingWithHardware#audio_libraries

and
http://www.arduino.cc/playground/Code/PIRsense

for the two parts of the project.

are you sure your pir sensor can detect distance? you might want to check that before you start anything.

this is what i have

does it dectect distance? if not. which sensor should i get.?

thanks

mary

that one only detects if there is motion present or not.
you might look at something like this
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/ping/List/0/SortField/4/ProductID/92/Default.aspx

or this

ok, guys.

im just gona stick wid motion, with LED.

pls help with audio set up and code.

thanks

mary

well, not much code you can do without knowing what hardware you have and how you have it wired.