Music Shield 2 on Arduino Mega : cannot read SD

Arduino, Seeeduino Serials and mutants. Share your problems and experence on arduino compatible board such as seeeduino/stalker, etc.

Moderators: lily.li, violet, salmanfarisvp

Post Reply
scanet
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Wed Mar 27, 2019 5:55 am

Music Shield 2 on Arduino Mega : cannot read SD

Post by scanet » Wed Mar 27, 2019 5:58 am

Hi,
I was working on a Arduino Uno, with the Music Shield v2.2, and I add no problem.
But when I put the same shield, with the same code compiled for Mega, via serial monitor I receive a message about an SD card reading error.
I think there's a pb with the library, conflict with ISP pins ???

Thanks for your help, I need it for my students.
Sebastien

User avatar
bestlux
Kindergarten
Kindergarten
Posts: 85
Joined: Wed Jan 30, 2019 11:51 am

Re: Music Shield 2 on Arduino Mega : cannot read SD

Post by bestlux » Mon Apr 01, 2019 11:13 am

Hello,
The maximum size SD card supported by this shield is 2GB, so pls make sure you have chosen right card(Nowadays SD cards of such size is hard to find lol

scanet
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Wed Mar 27, 2019 5:55 am

Re: Music Shield 2 on Arduino Mega : cannot read SD

Post by scanet » Thu Apr 25, 2019 9:16 pm

Thanks, but everything works fine on Arduino Uno, but changing shield from Uno to Mega makes it crazy with SD card.
Any other idea ?

bill.yu
Junior-7
Junior-7
Posts: 732
Joined: Mon Apr 02, 2018 11:05 am

Re: Music Shield 2 on Arduino Mega : cannot read SD

Post by bill.yu » Wed May 08, 2019 4:51 pm

Hi Sebastien,

I tested with 16G SD card with both arduino uno and mega with the same code. it works well without any change with code. thanks.

Image

Image

I use the play with name example, you have to replace the mp3 file name in player.playOne("p.mp3"). please provide more detail info when you do not solve the issue. Please also try to press the reset button. thanks.

Code: Select all

#include <SD.h>
#include <SPI.h>
#include <arduino.h>
#include <MusicPlayer.h>

void setup(void)
{
  Serial.begin(9600);
  player.begin();                      //will initialize the hardware and set default mode to be normal.
  player.setPlayMode(PM_REPEAT_ONE); //set mode to repeat playing a song
  player.playOne("p.mp3");          //play a song with its name
}
void loop(void)
{
  player.play();  //do some leisurely job
}

Post Reply