Wave Shield Inconsistent compiles

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

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Adept
 
Posts: 2
Joined: Tue Oct 18, 2011 4:12 pm

Wave Shield Inconsistent compiles

Post by Adept »

Hi, I'm working on a wave shield project. I added the MEMs sensor to the design. I want the wave shield to play different sets of sounds based on the orientation of the device.

But, I'm having some issues. I started having problem when I got to about 80 files on the SD card. If I add any more, the program will compile, but only some of the sound files may play partially, or none will. If I comment out the latest added file, things get better, but it doesn't seem very stable to me.

I see two weird behaviors.

1. Normally the serial debug window shows a list of all the files I have on the SD card. If I add another file, the file list is blank or is garbage. Sound may play or may not.

2. Some of the 80 I currently have, may or may not play. Seems to be compile pass dependent. Either everything plays, or some will not. They are just skipped.

Here is my setup:
void setup() {
analogReference(EXTERNAL); // Using the MEMs reference.
// set up Serial library at 9600 bps
Serial.begin(9600);
pinMode(ledPin, OUTPUT); // sets the digital pin as output

if (!card.init()) {
error("Card init. failed!");
}
if (!vol.init(card)) {
error("No partition!");
}
if (!root.openRoot(vol)) {
error("Couldn't open dir");
}

PgmPrintln("Files found:");
root.ls();

}

In the main loop I use the playcomplete() subroutine to play the files. Works usually. I just downloaded the latest WaveHC lib, but it seems to behave the same.,

Thanks,

John

Adept
 
Posts: 2
Joined: Tue Oct 18, 2011 4:12 pm

Re: Wave Shield Inconsistent compiles

Post by Adept »

Dang it, sorry to bother you all. I figured it out.

I had a feeling that it was related to the serial print stuff. I saw the post on buffer over runs with the serial port. I didn't find the same file or line to change, but I did edit the HardwareSerial.cpp file.

On line 59 I changed the SERIAL_BUFFER_SIZE from 64 to 16. That seemed to fix it. Also, some prints that weren't coming out are working now.

Don't you love it when a user figures out their own answer before you have to spend any time on it.

John

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: Wave Shield Inconsistent compiles

Post by adafruit_support_bill »

Don't you love it when a user figures out their own answer before you have to spend any time on it.
Absolutely!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”