Music Shield - Card Find Error

Ardiuno Compatible shields

Moderators: lily.li, violet

shayneyb
Pre-kindergarten
Pre-kindergarten
Posts: 9
Joined: Sat Nov 24, 2012 6:44 am

Music Shield - Card Find Error

Post by shayneyb » Sat Nov 24, 2012 6:50 am

I recently (today) purchased a SeeedStudio Music Shield for use with my Arduino 2560 Mega R1. When I loaded up the example musicPlayAll and an SD card formatted in FAT 32 using the wikis Method 1 the program hung on initializing the file system. Then I tried Method 2 and that had errors loading the files, so I uncommented the debug in Method 1 and got the following result:
Initlizing software serial
Initlizing SPI
Initlizing IO: Vsl
Initlizing IO: Keys
Initlizing IO: LEDs
Initlizing File System

Card found, starting... Failed.
Running Sine Test
Resetting MP3 codec

ClockF:B800
Initlization Done!
Booting-Press Play/Pause to enter recording mode
Entering play mode
(I added more to find where it was hanging)

Does anyone know how to fix this?

Side note: anyone know how to change Usernames?

ADDITIONAL INFO:

I forgot to mention, with the default SD example it read the card fine and listed its contents, perhaps its and issue with the SS pin? Don't know where to change that in code

User avatar
Jacket Chen
Staff
Staff
Posts: 659
Joined: Thu Jun 21, 2012 4:25 pm
Are you a staff member of seeedstudio?: yes
Which products/projects are your favorite?: Seeeduino Shields
Location: China

Re: Music Shield - Card Find Error

Post by Jacket Chen » Tue Nov 27, 2012 12:12 pm

hey boy
1) Please notice the red words:The library of Method 1 is not the same as the library of Method 2.When you use Method 1, make sure that there is no the library of Method 2 in... Arduino-1.0\ libraries. In other words, when you use one of the methods, ensure you have removed the library files of another method.Delete and coverage is not the same, so make sure your operation is deleting instead of overwriting.

The libraries of Method 1 is totally different from libraries 2.

2)Maybe you SD Card can't fit our Music Shield.

3)Usernames? our forum? i'm sorry you may not change your usernames.

Any problem ,please let's know. :)
Love little, love long.

shayneyb
Pre-kindergarten
Pre-kindergarten
Posts: 9
Joined: Sat Nov 24, 2012 6:44 am

Re: Music Shield - Card Find Error

Post by shayneyb » Wed Nov 28, 2012 5:15 am

shayneyb wrote:I recently (today) purchased a SeeedStudio Music Shield for use with my Arduino 2560 Mega R1. When I loaded up the example musicPlayAll and an SD card formatted in FAT 32 using the wikis Method 1 the program hung on initializing the file system. Then I tried Method 2 and that had errors loading the files, so I uncommented the debug in Method 1 and got the following result:
I guess I didn't say that as clearly as I could. I loaded the libraries for method 1, tested that, found it didn't work. Then i deleted the libraries from method 1, loaded the libraries from method 2, and found it didn't even compile for my board (i think it was due to a broken definition). After that i deleted the method 2 libraries, loaded the method 1 libraries, turned on debugging, Googled it, THEN i posted here.

User avatar
Jacket Chen
Staff
Staff
Posts: 659
Joined: Thu Jun 21, 2012 4:25 pm
Are you a staff member of seeedstudio?: yes
Which products/projects are your favorite?: Seeeduino Shields
Location: China

Re: Music Shield - Card Find Error

Post by Jacket Chen » Wed Nov 28, 2012 9:38 am

hey boy
1) u can download the attachments, and have a try,whether it is ok?

2)if not, please change for a another SD Card

3)if it is still not solved, please show us the picture or data while u r programming
Love little, love long.

shayneyb
Pre-kindergarten
Pre-kindergarten
Posts: 9
Joined: Sat Nov 24, 2012 6:44 am

Re: Music Shield - Card Find Error

Post by shayneyb » Sun Dec 02, 2012 4:58 am

It must just be a bug somewhere in the definitions for a Mega. Since the example libraries only support MMC I decided that rather than debug them I'd just adapt a library that supports full SD, SDHC and SDXC. Rodan's playa library works well, and I finally get to hear my shield working!

Link:
https://github.com/rodan/playa

P.S. When I finish adapting it to the Seeedstudio Music Shield I'll post the code for anyone else who has problems with Mega's and this shield

shayneyb
Pre-kindergarten
Pre-kindergarten
Posts: 9
Joined: Sat Nov 24, 2012 6:44 am

Re: Music Shield - Card Find Error

Post by shayneyb » Sun Dec 02, 2012 5:12 am

Also:
Thanks for your help jacket!

User avatar
Jacket Chen
Staff
Staff
Posts: 659
Joined: Thu Jun 21, 2012 4:25 pm
Are you a staff member of seeedstudio?: yes
Which products/projects are your favorite?: Seeeduino Shields
Location: China

Re: Music Shield - Card Find Error

Post by Jacket Chen » Mon Dec 03, 2012 9:14 am

Enjoy yourself :D
Love little, love long.

shayneyb
Pre-kindergarten
Pre-kindergarten
Posts: 9
Joined: Sat Nov 24, 2012 6:44 am

Re: Music Shield - Card Find Error

Post by shayneyb » Thu Dec 06, 2012 11:52 am

Just for the sake of keeping my progress up to date

I will really only be working on this during weekends. Attached is a sketch and the required libraries to just get the music shield working. It is poorly coded but works reliably. It doesn't even have controls :lol: but is compatible with SD, SDHC and SDXC (up to 2TB) and works with the Mega.

EDIT: I said poorly coded, it may be ONLY Mega compatible. UPDATE: Since the SD library handles SPI, it should be fully compatible with all arduinos using the default music shield pin out.

My goal is to create a library that is:
  • Simple
  • Compatible with all Arduinos
  • SD, SDHC and SDXC Compatible - Complete

jmasse13
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Mon Dec 10, 2012 1:29 pm

Re: Music Shield - Card Find Error

Post by jmasse13 » Tue Dec 11, 2012 12:15 am

hey shayneyb,

I have tried following your post along with a ton of other posts on this site. I keep having issues with my Music Shield. I am trying to use a 4gb SD card formatted for Fat32. I have 2 songs on it in 8.3 filename format (not sure if that helps).

I get nothing but occasional static. The weird thing is there are no lights on the shield, just a random blinking TX light on the arduino.

I am using an Arduino Uno ide 1.0.2. If i look at the serial monitor is just keeps saying "Invalid format, reformat SD." I have formatted it several times in different fat32 settings.

I am using your MusicLibrary that you posted and it does not seem to be working. I am hoping that I am missing something easy or silly and that my shield is not broken.

Thanks,
J

Edit: I got the SD to at least get read by changing the SPI speed to HALF, but now it just cycles through all the songs (See screenshot). I restart the Arduino several times and once I got it to play with no controls.

Any thoughts?

shayneyb
Pre-kindergarten
Pre-kindergarten
Posts: 9
Joined: Sat Nov 24, 2012 6:44 am

Re: Music Shield - Card Find Error

Post by shayneyb » Tue Dec 11, 2012 6:26 am

I think its an issue with how the shield resets itself. Whenever I reset mine i end up holding the button for about 1-2sec to be sure it resets. if it played once then it means your shield isn't broken (that's the whole reason i started this, thought mine was). I personally have been using OGG files. I don't know if adding the patch for the vs1053b will help but that's not in there yet. Try seeing if a long reset will help, ill look through the program for any possible issues.

Post Reply