Home Forums Sparkfun MP3 Shield Library Support Forum sd init problem from Gravitech's MP3 Player add-on Reply To: sd init problem from Gravitech's MP3 Player add-on

#2586
Anonymous
Inactive

Is my Gravitech Arduino Nano or MP3 Player add-on defective? I did follow the tutorial closely. And now tried all programs you suggested but there is still no luck!!

My environment: Ubuntu 12.10, Arduino 1.0.1

And the libraries are placed here:

pwd
/home/mko/projects/adafruitRfid/workspace/libraries
mko@mko-ThinkPad-W500:~/projects/adafruitRfid/workspace/libraries$ ls
Adafruit_NFCShield_I2C  SdFat  SFEMP3Shield  WaveHC  where Adafruit_NFCShield_I2C  and WaveHC is from my successful Adafruit Wave Shield project before.

I have decided to drop SdFat and SFEMP3Shield under the libraries of my previous adafruitRfid project so that I don’t have to modify my IDE setup.

 

Here are the many different tests I have performed.

1) test 1 – I have followed the tutorial for MP3Shield_Library_Demo

a) formatted the micro sd card to FAT-16 using the sdFormatter program (note: this is done on a Mac not on my own Ubuntu) and copied the track001.mp3 and track002.mp3 files to the micro sd card.

b) downloaded Sparkfun-MP3-Player-Shield-Arduino-Library-master.zip

c) unzip the file, and placed the 2 folders SdFat and SFEMP3Shield under /home/mko/projects/adafruitRfid/workspace/libraries

d) defined GRAVITECH 1 in SFEMP3ShieldConfig.h

e) Added the right  after setup() of MP3Shield_Library_Demo.ino the pinMode statements as given in the tutorial

void setup() {

pinMode( 2, OUTPUT);
pinMode( 3, OUTPUT);
pinMode( 4, OUTPUT);
pinMode( 6, OUTPUT);
pinMode( 7, OUTPUT);
pinMode( 8, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);

uint8_t result; //result code from some function as to be tested at later time.

f) upload and run the program on my arduino nano board. The IDE set up are:

Programmer: AVRISP mkII
Serial Port: /dev/ttyUSB0
Board: Arduino Nano w/ATmega 328
Serial Monitor: Carriage return / 115200 baud

g) result ==>

Can’t access SD card. Do not reformat.
No card, wrong chip select pin, or SPI problem?
SD errorCode: 0X1,0X0

==================================================================

2) test 2 – execution of QuickStart

Serial Monitor: Carriage return / 9600 baud

result ==>

SD chip select is the key hardware option.
Common values are:
Arduino Ethernet shield, pin 4
Sparkfun SD shield, pin 8
Adafruit SD shields and modules, pin 10

Enter the chip select pin number: 8

SD initialization failed.
Do not reformat the card!
Is the card correctly inserted?
Is chipSelect set to the correct value?
Is there a wiring/soldering problem?
errorCode: 0x1, errorData: 0x0

Restarting

Enter the chip select pin number:
Invalid pin number

Restarting

Enter the chip select pin number: 4

SD initialization failed.
Do not reformat the card!
Is the card correctly inserted?
Is chipSelect set to the correct value?
Is there a wiring/soldering problem?
errorCode: 0x1, errorData: 0x0

Restarting

Enter the chip select pin number: 10

SD initialization failed.
Do not reformat the card!
Is the card correctly inserted?
Is chipSelect set to the correct value?
Is there a wiring/soldering problem?
errorCode: 0x1, errorData: 0x0

Restarting

==================================================================

3) test 3 – execution of SdInfo

result ==>
SdFat version: 20130313

type any character to start

==> there is no response whatever key I hit.

==================================================================

4) test 4 – execution of SdFormatter

result ==>

This sketch can erase and/or format SD/SDHC cards.

Erase uses the card’s fast flash erase command.
Flash erase sets all data to 0X00 for most cards
and 0XFF for a few vendor’s cards.

Cards larger than 2 GB will be formatted FAT32 and
smaller cards will be formatted FAT16.

Warning, all data on the card will be erased.
Enter ‘Y’ to continue:

==> I hit ‘Y’ and hit enter, but nothing happened in the serial monitor. The line remains at “Enter ‘Y’ to continue:”

==================================================================