What hardware do I need?

Hello for my project, when a person walks by I want the arduino device to whistle, or have sound effects like fart noises, etc.....

I know I need a motion detection sensor and a speaker. But also do I need one of them wave shields to play the audio through or can I play it through the arduino itself.

Also if there anything else I need for this project? And is there any tutorials as to how to connect everything together?

Thank you.

Hello for my project, when a person walks by I want the arduino device to whistle or maybe shout something sexual or harassing at the person.

That in many cases is illegal to do in this country, how about your country? How old are you?


Hahaaa… Whoops. I didn’t mean for it to sound so crude.
It’s a uni project so I’m obviously not going to have playing to anyone in the public, just my peers.

To be honest I don’t even know why I put that for. I mostly meant just fart noises, and some witty stuff aimed at students.

Sorry if I offended you. Any help?


On the assumption that this is just an innocent 'uni project:

The Arduino can't make complex sounds easily without some help. If you want to play samples of intelligible speech for more than a fraction of a second then you'll need something external. Either a wave shield, or if you're on a budget you could try this fun-looking instructables hack:


(I've not tried this my self yet - my MP3 players are on their way from China).

For the sensor, I guess you want a PIR motion-detector or you could use "tripwire" type of arrangement with an LED/laser, a reflector/mirror and a detector (LDR or photo-transistor) so that it triggers when the beam is broken.

Thank you for the response.

I may just have to buy the wave shield as I'm a newbie at the arduino and I've only just got a LED light to work when you press a button. As the MP3 shield looks confusing to me.

Could you explain in more detail, if you have the time, as to how everything works together please.


Well, how it works depends on what you want to make it do and how much time you are committing to developing its functions.

You would need an arduino - an Uno would be ideal, a wave shield, such as this:


and a motion sensor such as:


If you look at each of these products you will see that there are descriptions of how to use them and libraries of functions to get you started on interfacing them together. There are many similar items so you don't have to buy these ones but if you look at these it will help you to see what they do.

Your sound clips would be saved on to an SD card. You would write a sketch that would monitor the sensor and if motion was seen then either the next track on the SD card would be played or it would pick a random track (depending on your preference). From the descriptions of those components and the general Arduino tutorials you should be able to get a good way towards writing a suitable sketch. If you get stuck I'm sure someone would help you out.