BlackDynamite

Noob speaking here. I'm really stuck. I don't know much about the Arduino, but I need to make something that is not very hard I think. What I need is a way to play a sound (mp3,wav) from my computer, on my computer, by using a button connected to my Arduino. How is this possible? If you can help me, you'l be a hero!

Cheers

dxw00d

The Arduino detects the button press, and sends a message over Serial. You'll need something running on your PC that will receive the Serial data and play the MP3 file. A Processing sketch (http://processing.org), using the Minim library (http://code.compartmental.net/tools/minim/), could do that.

dxw00d

Both. Have a look at the Serial I/O -> SimpleRead example in Processing. At the bottom of the sketch, in a comment block, is a simple Arduino sketch that sends the result of a digitalRead() over Serial. The example sketch changes the colour of a rectangle, but you can add your Minim code to it.

You can only have one setup and draw function in a sketch. You have to merge the codes.Most likel you don'tknowhow to do that. It's one of the problems that cut and paste programming gives you. You will have to learn at least the very basics of what you are doing.Try a few of the examples and get a feel for what you are doing.

BlackDynamite

I understand what you mean. Unfortunately I don't have much time.. But really thanks for the thinking and helping me out. I'm going with this information to my teacher and hope he can help me complet the project..