MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

bTestSD.ino - Initializing SD card...initialization failed
MUFF WIGGLER Forum Index -> nw2s  
Author bTestSD.ino - Initializing SD card...initialization failed
clone45
Hello,

I'm experimenting with the SD card of the nws2/b, but I'm having some issues getting the code to run. I'm using bTestSD.ino. Here are some specifics:

1. I had to crank down the serial port speed to 9600, which is the speed of my serial port, otherwise serial monitor was outputting garbage.
2. I'm programming the nw2s::b using a serial cable
3. I removed all of the files from the SD card and added a single small .wav file. I wouldn't expect that the file contents would cause this error.

Here's the output from serial monitor:
Code:

Starting...
Initializing...
digital output pins
digital input pins
noise pin
beatclock pins
DAC CS pins
enable beat display
analog read resolution: 12
---- 64 1
LED driver status: 1
done setting up.


Initializing SD card...initialization failed. Things to check:
* is a card is inserted?
* Is your wiring correct?
* did you change the chipSelect pin to match your shield or module?


The original card that came with the nw2s/b is inserted - but only contains one file, kick1.wav. I've tried two different Arduino IDE versions: 1.5.6-r2 and a nightly build from about 2 weeks ago.

Any suggestions?

Thanks,
Bret
scottwilson
There's a few errors depending on how far it gets, and yes, this is way before ever looking at a file. This error happens when the SD library can't communicate with the SD card.

If your computer is reading it fine, then let's assume for the time being that the card is actually okay. First silly check is that the SD card is pushed in well and latched with something pointy. I've been using the edge of a SD to microSD adapter to push it all the way in.

After that, my first check would be the cabling... When the sketch runs, does the READ light blink even slightly? If not, then It's probably the cable. Make sure that the SD reader cable is on the connectors well, and worst case, take a small screwdriver and push on all the wires in the connector slots.

If it does blink, that doesn't completely rule out the cable, so try anyway, and if the cable is fine, then it could be the card, but that's probably the less likely scenario.

The IDE version shouldn't matter much, I don't think Arduino has touched the SD library in ages.

Hope that helps, let me know if that provides any more info that might help debug.

s
clone45
Thanks for the support, Scott. I may have figured it out. The cable to the card reader looked fine, but I think that the cable attached to the circuit board might be off by a pin. Let me know what you think. I've attached a photo. If that's true, then I'll just scoot it over!

PS: The read light does turn on briefly while the "Initializing SD card..." code is running.

Cheers,
Bret

scottwilson
Yeah, that's definitely incorrect. They should be lined up 1:1... I said this before, and I apologize cause I don't know which of you were kits and which were assembled, but if that's one I put together, then I don't know how it would have gone out that way. If it's mine, sincere apologies!

s
clone45
It's no problem Scott! It was assembled, but it's no biggie.

Bingo! The bTestSD sketch now works as expected. Thanks a ton! nanners

Code:

Starting...
Initializing...
digital output pins
digital input pins
noise pin
beatclock pins
DAC CS pins
enable beat display
analog read resolution: 12
---- 64 1
LED driver status: 1
done setting up.

Initializing SD card...Wiring is correct and a card is present.

Card type: SD1

Volume type is FAT16

Volume size (bytes): 127041536
Volume size (Kbytes): 124064
Volume size (Mbytes): 121

Files found on the card (name, date and size in bytes):
SYSTEM~1/     2014-08-01 15:48:24
  INDEXE~1      2014-08-01 15:48:24 76
KICK1.WAV     2014-08-01 18:43:28 23208

MUFF WIGGLER Forum Index -> nw2s  
Page 1 of 1
Powered by phpBB © phpBB Group