So I purchased the wave shield. I have a simple (well...conceptually simple) action I want and that is:

if a button is on HIGH, pause playback of audio file. if its low, continue playing.

I have the shield playing back a song in a loop fine. I also interfaced a button to the wave shield and tested a basic button sketch which works fine and this concludes their are not any hardware issues.

My problem is nothing happens when I use my code of a basic modified sketch. it compiles, and just continuously plays back an audio file without any regard for the switch. (made sure pin was correct in code). I have a testor LED that just very dimmly flickers on, and does nothing. As I said, I tested the button with a simple button state sketch and it works fine.

/* * This example plays every .WAV file it finds on the SD card in a loop */#include <WaveHC.h>#include <WaveUtil.h>

SdReader card; // This object holds the information for the cardFatVolume vol; // This holds the information for the partition on the cardFatReader root; // This holds the information for the volumes root directoryWaveHC wave; // This is the only wave (audio) object, since we will only play one at a time

// Now we will look for a FAT partition! uint8_t part; for (part = 0; part < 5; part++) { // we have up to 5 slots to look in if (vol.init(card, part)) break; // we found one, lets bail } if (part == 5) { // if we ended up not finding one :( error("No valid FAT partition!"); // Something went wrong, lets print out why }

So when a valid wav file has been found, this bit plays it. Because of the while loop, it will only exit once the file has been played and wave.isplaying is false. Your code in loop then immediately tests the same wave.isplaying status and apparently you expect it to be true in some cases. It won't be though because play didn't exit until it was false.

actually your have not define a micro....how about you do this at the top#define buttonState digitalRead(buttonPin);this way every time you write buttonState it mean it will read the current state of the button pin

You're making life harder for yourself using that example code - it's designed to loop through every wav file on your SD card. There is a simpler example on the ladyada site (where I assume you got your code): http://www.ladyada.net/make/waveshield/libraryhcplay6.html. Try and get the playfile function working in your code instead of play. Then you should finally see your serial prints at least.