Play .WAV file with code

Hello! This question may sound simple but I am a complete newbie to Arduino but finding it very fun and pretty easy to get started with, so here is my question.

I am trying to build a project to use in another homemade project that when my sensors initiate, I would like my Arduino to play a short .WAV file to announce things have gone smoothly. Possibly announce the date and time using prerecorded months, days, etc. I have purchased a WTV020M1 chip and have an Arduino Uno. Is this possible to do with this hardware? Is it possible to have the files played off an audio chip with an SD card to store the .WAV files through code and not with a push of a button? I see a lot of examples for this chip with push buttons, but I would like my project to play different files depending on different conditions through coding.

Thanks for any direction anyone can give me! Arduino looks like a great addition to my home built projects, I just need some guidance and help!

This has been my major hang up on my project.

Is it possible to have the files played off an audio chip with an SD card to store the .WAV files through code

Yes, however I am finding little information about that chip. You don't need it however, you just need either and external D/A chip or at a reduced quality use the internal PWM generator and an external RC filter. Look up the examples AdaFruit has for its "wave shield"

Hello! Sorry I am pretty new using Arduino, but I am finding it fascinating! However, I am having trouble figuring out which hardware is best for my project. I hope that any of you can help and guide me in the right direction!

The idea I have for my project is as follows. I build experimental rockets at home and have been thinking about using onboard electronics on my builds. I have found a good chip to calculate altitude, a chip to find the rockets orientation (gyro), and an accelerometer to measure the acceleration of the rocket, all of which I've already got working. I believe the chip is called 10DOF, however the single chip contains all these chips in one, "10DOF L3GD20 LSM303D BMP180 Gyro Accelerometer Compass Altimeter" was the name of item shipped.

The problem I've run into is that I'd like to install a chip that will allow me to play a specific .WAV file when my altimeter initializes, another specific .WAV file when my gyro initializes, and so on. I'd also like to code it so that it will voice out the date and time from .WAV files, and start an audio countdown until launch. At which time all the senors would gather data for flight.

I've gotten everything to work except the audio idea, and has really stumped me. I purchased a WTV020-SD-16P chip, and I posted in another forum, and was recommended the AdaFruit Wave Shield, which looks interesting. My real question here is what type of hardware would be best, and is this idea even possible to get the audio to work? I've noticed that in the description of the AdaFruit Wave Shield says that it's possible to play audio triggered by a sensor. My idea was that I could make a definition of the .WAV file's path in the code, and call it later in the actual code. Any idea's would be greatly appreciated. If I could get this to work, I have more idea's to further this idea, but getting the audio to work in this manner would be the main pivot point.

There are several existing units for rocketry you can buy.

Functionally you can design many different working circuits to do what you require.

However , with rockets there can be large G forces to contend with and weight is to be considered.

If you are competent electronically , a large part of this will be down to construction /fabrication to be reliable in flight.

Building on veroboard is unlikely to be successful.

Any suggestions on hardware to do the audio things I'd like to do? The sole purpose of doing the projects that I do is to solely build everything myself. There are a lot of electronics that are pre-built that can be ordered, however this goes against what I'd like to achieve. Thank you for the reply, and I'd really like to experiment with Arduino on my builds. As far as space goes, I have room for a quite large circuit, and weight isn't a problem. My builds aren't small, and upwards around 100lbs of thrust. My electronics bay can hold a circuit aproximetly 3" in diameter and 12" long. Im really curious about which types of chips I can order that will achieve specific file playback upon code request. Thanks again.

Dragonfyre: problem. My builds aren't small, and upwards around 100lbs of thrust.

Not exactly small. What is the specific impulse.

I’d have to dig out my rocket specs as I’ve tested it, but with all due respect, my question is about which chips would work for my specific requirements. I’m rather lost as to how powerful my rocket engine having much to do with getting audio playback of specific .WAV files at specific times. The audio would be completely before liftoff, and if the circuit malfunctioned or failed after liftoff, I’d rebuild it and redesign the electronics bay. I’m rather keep this thread about Arduino chips that would help my project along. Thanks again.

Get an MP3 module, can play any of 199 files with just a simple serial command,
Serial.write(0x01); // to 0xC7
http://www.mdfly.com/search.php?search_query=mp3

You should not cross post on this forum.

Yes the wave shield will do 100% what you want.

@Dragonfyre, please do not cross-post. Threads merged.

Okay thanks guys! Sorry about posting to another forum. Didnt know that you shouldn't. Thought that it didn't quite fit the oringal subject anymore. I'll have to order a wave shield and figure that one out! Thanks for everyone's help! I really appreciate it!!!

Dragonfyre:
Thought that it didn’t quite fit the oringal subject anymore.

Ask a moderator to move the thread. Report to Moderator works well for that.

Dragon fire, if you intend to put these together yourself , some suggestions.

Replace all electrolytic caps, remove connectors and solder direct.

Do not use arduino with crystal , get one with a resonator instead.

As mentioned, the Adafruit Wave Shield will do everything you need without much fuss.

There are MANY examples posted on to interact with it and playback sound files.

Trigger by code.. set up code to watch a switch input and trigger playback..etc