Pages: [1]   Go Down
Author Topic: Music Shield v2 error  (Read 440 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged


~Dan

DELHI
Offline Offline
God Member
*****
Karma: 8
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

AMPS

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


~Dan

DELHI
Offline Offline
God Member
*****
Karma: 8
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* music.JPG (103.25 KB, 1366x768 - viewed 20 times.)
Logged

AMPS

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am still getting an error message...


* Screen Shot 2014-08-11 at 12.10.32 PM.png (17.87 KB, 452x137 - viewed 15 times.)
Logged


~Dan

DELHI
Offline Offline
God Member
*****
Karma: 8
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

AMPS

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


~Dan

DELHI
Offline Offline
God Member
*****
Karma: 8
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

AMPS

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
//  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
}
Logged


~Dan

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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.

* libraries.rar (85.74 KB - downloaded 5 times.)
Logged


~Dan

DELHI
Offline Offline
God Member
*****
Karma: 8
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Check below part of code
Code:
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
Logged

AMPS

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 
Logged


~Dan

DELHI
Offline Offline
God Member
*****
Karma: 8
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

* MusicShieldMaster.zip (59.85 KB - downloaded 5 times.)
Logged

AMPS

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 

* Music_Shield-master (2).zip (60.76 KB - downloaded 6 times.)
Logged


~Dan

Pages: [1]   Go Up
Jump to: