waveshield works but couldn't open file

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

waveshield works but couldn't open file

Postby meg » Thu Mar 29, 2012 5:55 am

hi there,

it's been a while, but i'm back using the wonderful waveshield again! firstly, in case anyone is searching for keywords "waveshield v1.0" and "uno" and "strange", i can tell you that when i tested the dap_hc sketch on an arduino uno + waveshield v1.0, i could only hear the first part of the first file playing. so i switched the uno for a duemilanova 328 and now it works fine.

but now i have another problem:

so dap_hc works fine, but when i tried running wavehc_play6, i get the following error:
Couldn't open file FILENAME.WAV

this only happens when i press the first button. this button is wired to pin 14 (A0) and connected to ground with a 10K resistor. all other buttons are wired similarly, to the other analog pins, but return nothing at all, no error, no sound.

anyone have any clue as to what it might be?
meg
 
Posts: 56
Joined: Wed Jan 28, 2009 5:48 am

Re: waveshield works but couldn't open file

Postby adafruit_support_bill » Thu Mar 29, 2012 6:35 am

"Couldn't open file FILENAME.WAV"
That doesn't look like output from the standard wavehc_play6 sketch:
Can you post the exact sketch you are using? (Use the "Code" button above the message edit box.)
User avatar
adafruit_support_bill
 
Posts: 15951
Joined: Sat Feb 07, 2009 9:11 am

Re: waveshield works but couldn't open file

Postby meg » Thu Mar 29, 2012 8:31 am

hi ladyada,

thanks for your feedback - that is indeed the code i was using, only with my filenames instead of 1.WAV, 2.WAV, etc. just be 100% sure, i copy-pasted it again, and ran it before i remembered to change the filenames. interestingly enough, i get this:

WaveHC with 6 buttons
Free RAM: 637
Using partition 1, type is FAT16
Ready!
Couldn't open file 1.WAV

could it be to do with using a v1.0 waveshield? so strange that it works with dap_hc and not this one. hmm... gonna poke around in the code a bit...
meg
 
Posts: 56
Joined: Wed Jan 28, 2009 5:48 am

Re: waveshield works but couldn't open file

Postby meg » Thu Mar 29, 2012 8:50 am

gah, darnit, it was a problem with the filenames! stupid human error! thanks for looking into it anyway, ladyada...

<crawls away in shame>
meg
 
Posts: 56
Joined: Wed Jan 28, 2009 5:48 am

Re: waveshield works but couldn't open file

Postby meg » Thu Mar 29, 2012 9:48 am

ok, at the risk of coming across as a nut, i'll ask another question here... about the SD card error codes.

it turns out that the initial problem i had with the Uno is also happening with the Duemilanova, only it doesn't happen quite so quickly. when i run dap_hc, the soundfiles stop playing after 30sec or so (different each time) and i get:

SD I/O error: 10

i had a look in SdReader.h and it has a handy comment: "card returned an error token instead of read data".

although i'm not sure what that means... loose connection? something out of synch?
meg
 
Posts: 56
Joined: Wed Jan 28, 2009 5:48 am

Re: waveshield works but couldn't open file

Postby adafruit_support_bill » Thu Mar 29, 2012 10:09 am

i'm not sure what that means... loose connection? something out of synch?

Could be a bad connection. Make sure the card is firmly seated in the holder. If you post photos of the front & back of the board we can take a look for any assembly problems.

Another possibility is an error on the card itself, or a card compatibility problem. Try a different card if you have one.
User avatar
adafruit_support_bill
 
Posts: 15951
Joined: Sat Feb 07, 2009 9:11 am

Re: waveshield works but couldn't open file

Postby meg » Thu Mar 29, 2012 10:58 am

ok, i've taken pics of the front and the back:
large image of the front
large image of the back

and also i should mention, i got the kit with one of the 0.1µF capacitors missing (got it via a friend, who lost the part) so i used a very similar one (also 0.1µF, also has 104 printed on it) for C7. could that be the problem?
large image of the capacitor

tomorrow i'll have access to another SD card, so i'll try that and let you know what happens. thanks for your help so far!
meg
 
Posts: 56
Joined: Wed Jan 28, 2009 5:48 am

Re: waveshield works but couldn't open file

Postby adafruit_support_bill » Thu Mar 29, 2012 11:22 am

The soldering looks good and the replacement capacitor is fine. The only areas of suspicion are the 2nd and 4th pins from the left on the SD card holder and the end of R6 nearest the card holder. They look a little rough which could indicate a 'cold joint'. Since this is the area where most card communication problems occur, we should make sure they are good. Retouch those joints with a clean, hot iron and make sure the solder flows well between the pin and the pad underneath.
User avatar
adafruit_support_bill
 
Posts: 15951
Joined: Sat Feb 07, 2009 9:11 am

Re: waveshield works but couldn't open file

Postby meg » Thu Mar 29, 2012 1:12 pm

hey, thanks for taking such a close look!

i've resoldered those points you mentioned, but still the same problem. tomorrow i'll test it with a different SD card - that could well be the problem. i'll report back once i've tested!
meg
 
Posts: 56
Joined: Wed Jan 28, 2009 5:48 am

Re: waveshield works but couldn't open file

Postby meg » Wed Apr 11, 2012 3:23 pm

just wanted to update this thread to say that it turned out to be a problem with the SD card all along. funny that it worked differently with the different (duemillenove vs uno) boards.
meg
 
Posts: 56
Joined: Wed Jan 28, 2009 5:48 am

Re: waveshield works but couldn't open file

Postby erg144 » Thu Apr 12, 2012 7:10 am

I really like this wave shield, but found one thing lacking for me. The current configuration only lets you read files from the card. In my case, I wanted to also store information onto the card, but there is no "write". I'm guessing this was done to save space, but is becoming a problem for me as I'm having to hack the thing up to include the ability to write information.

As a future release - write support would be a great addition.
erg144
 
Posts: 8
Joined: Tue Jan 17, 2012 7:40 am

Re: waveshield works but couldn't open file

Postby adafruit_support_bill » Thu Apr 12, 2012 7:15 am

The AF_Wave and WaveHC libraries are specifically optimized for streaming WAV files to the DAC. But the regular SD library works with the card as well and gives you both read and write access.
User avatar
adafruit_support_bill
 
Posts: 15951
Joined: Sat Feb 07, 2009 9:11 am

Re: waveshield works but couldn't open file

Postby fat16lib » Thu Apr 12, 2012 11:46 am

I wrote two libraries for the Wave Shield, WaveHC and WaveRP.

WaveRP uses SdFat and can play and record audio files. It also allow files to be written using the standard SdFat API.

WaveRP is located here http://code.google.com/p/waverp/downloads/list.
fat16lib
 
Posts: 586
Joined: Wed Dec 24, 2008 12:54 pm



Return to Arduino Shields from Adafruit

Who is online

Users browsing this forum: No registered users and 6 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]