Play sound with Arduino

Hello everyone,

as already explained in the subject, I need to play multiple sounds in my program Arduino “attached an example,” I will need a dedicated system “ic + speaker” OR by following this tutorial ? :
https://www.arduino.cc/en/tutorial/melody

Thank you

Sound1.wav.zip (413 KB)

kiman26: Hello everyone,

as already explained in the subject, I need to play multiple sounds in my program Arduino "attached an example," I will need a dedicated system "ic + speaker" OR by following this tutorial ? : https://www.arduino.cc/en/tutorial/melody

Thank you

Have you looked at the "tone()" function? There's a "toneMelody" example provided with the IDE, under ">File Examples >Digital >toneMelody".

If connecting a (small) speaker directly to the Arduino, you need to include a series resistor to limit current to a safe level for the chip. About 180 ohms is safe with an 8 ohm speaker, or possibly 150 ohms, allowing for the chip's internal resistance.

To make it loud enough, you might need to add an amplifier.

There's more info on the 'tone()' function here:- Tone

Thx OldSteve,

So I need to make a circuit with resistors and amplifier ?!
if so, Can I make a circuit without blocking the main sketch in Arduino ?, i.e store a multiple tone, and play one of them without blocking the running the sketch ?

kiman26: if so, Can I make a circuit without blocking the main sketch in Arduino ?, i.e store a multiple tone, and play one of them without blocking the running the sketch ?

If you code it right.