Go Down

Topic: Music Shield v2 error (Read 540 times) previous topic - next topic

DanBrookwell

I am trying to get the Seeedstudio music shield v2.0 working and I keep getting an error when I go to upload my sketch:

MusicShield/MusicPlayer.cpp.o: In function `MusicPlayer::begin()':
/Users/Name/Documents/Arduino/libraries/MusicShield/MusicPlayer.cpp:148: undefined reference to `Sd2Card::init(unsigned char, unsigned char)'

Anyone have a similar issue?
~Dan

AMPS-N

Can you share From where you downloaded The library. If possible share library here.
Also Let us know the part of code that ur trying to compile.
AMPS

DanBrookwell

I got the SD library from https://github.com/adafruit/SD and im using the musicshield library from https://github.com/Seeed-Studio/Music_Shield.  I'm trying to upload the playWithName example file.
~Dan

AMPS-N

Hi have downloaded your library . I am not getting any error. For reference i have attached library try to save it upload it.
I have also attached example code i uploaded.

check your library. If not use below one. Please share screenshot of error message
AMPS

DanBrookwell

I am still getting an error message...
~Dan

AMPS-N

Please let me know your set up
Which version of IDE you are using>>
which controller your using???
provide me connection diagram.
AMPS

DanBrookwell

I'm using an Arduino Uno and I am running a NRF24l01 that uses digital pins 9-gnd and the 3.3v pin. 
The nrf pins are as follows:
  VCC -> 3.3v
  GND -> GND
  CSN -> 10
  CE -> 9
  MUSI -> 11
  SCK -> 13
  MISO -> 12
Hopefully this helps.
~Dan

AMPS-N

Can you post your actual code. That you are trying to upload.
Also share datasheet oF music shield.
AMPS

DanBrookwell

Heres all the info on the shield...its unfortunately limited along with any support which gets me mad...
I have actually moved on to another library to try if there are any different results.  Im using this library: https://github.com/amperka/music-shield.

And my code is as follows:
Code: [Select]

//  File MusicPlayer.cpp
//
//  For more details about the product please check http://www.seeedstudio.com/depot/
//  Copyright (c) 2012 seeed technology inc.
//  Author: Frankie.Chu
//  Version: 1.7
//  Time: June 10, 2012
//  Changing records:
//   
//  This library is free software; you can redistribute it and/or
//  modify it under the terms of the GNU Lesser General Public
//  License as published by the Free Software Foundation; either
//  version 2.1 of the License, or (at your option) any later version.
//
//  This library is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//  Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public
//  License along with this library; if not, write to the Free Software
//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#include <Fat16.h>
#include <Fat16Util.h>
#include <NewSPI.h>
#include <arduino.h>
#include "pins_config.h"
#include "vs10xx.h"
#include "newSDLib.h"
#include "MusicPlayer.h"
MusicPlayer myplayer;
void setup()
{
  Serial.begin(9600);
  myplayer.begin();//will initialize the hardware and set default mode to be normal.
}
void loop()
{
  myplayer.setPlayMode(MODE_REPEAT_ONE);//set mode to repeat to play a song
  myplayer.playSong("test.wav");//play a song named with test.wav
  while(1);//If the mode is normal, it will stop when it finished playing all the songs in the playlist
}
~Dan

DanBrookwell

Ive been searching around through Seeed forums and have come across the attached library.  I'm using the PlayWithInput example and am still getting an error upon initialization of the SD card.  This time with the new library the error is reading
Code: [Select]

error: card.init failed
SD error: 1


I have formatted my card to FAT16 and I have one mp3 file on it titled 01.mp3.  In the PlayWithInput example I changed the "name.mp3" to "01.mp3"

If theres anyone that might be able to help out i'd be so grateful! This is a huge headache lol.
~Dan

AMPS-N

Check below part of code
Code: [Select]

void loop()
{
  myplayer.setPlayMode(MODE_REPEAT_ONE);//set mode to repeat to play a song
  myplayer.playSong("test.wav");//play a song named with test.wav
  while(1);//If the mode is normal, it will stop when it finished playing all the songs in the playlist
}


Share me  library itself you are working on. Initially i have shared u library have you tried out the library
AMPS

DanBrookwell

Sorry but I cant locate your library... Is there any way you could reattach it?

Also I have been trying many different libraries all night with no luck.  It seems that my music Shield v2 cs pin might be an issue but im not entirely sure. 
~Dan

AMPS-N

Also try to add your library . SO i can check what problem. Unzip below lib and copy to arduino library file. Try to run program.
AMPS

DanBrookwell

I have just contacted Seeed and they supplied me with an updated library for their v2.0 model. I've attached it.  It no longer gives me the "sd init" error (or at least not yet lol) but instead in serial monitor I never see anything. its as if the player.begin() function isn't loading.  I've included debugging in the code and ive narrowed it down to the begin() function not working properly I believe.  Hopefully this makes sense and is replicable. 
~Dan

askhenry

Hi.

Did you ever get your music shield to work ?
I am struggling too, I have the UNO board and the maplin music shield http://www.maplin.co.uk/p/music-shield-for-arduino-n99dg

do you have any code or help you can offer me ?

Cheers

Go Up