Pages: [1]   Go Down
Author Topic: Seeed Studio Music Shield...Issues  (Read 2249 times)
0 Members and 1 Guest are viewing this topic.
Seattle, WA
Offline Offline
Full Member
***
Karma: 1
Posts: 225
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I went out today and got myself a SeeedStudio Music Studio (http://seeedstudio.com/wiki/Music_Shield) All's been well with this library: http://seeedstudio.com/wiki/File:Music_v1_2.zip and this example code:

Code:
#include <avr/io.h>
#include "config.h"
#include "filesys.h"
#include "player.h"
#include "vs10xx.h"
#include "record.h"
#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3);//pin2-Rx,pin3-Tx(note: pin3 is actually later used as volume down input)

void setup()
{
  Serial.begin(9600);
  //Serial.println("Hello test!");
  mySerial.begin(19200);// used for receiving command data from the iPod dock.
  
  InitSPI();

  InitIOForVs10xx();

  InitIOForKeys();
  
  InitIOForLEDs();

  InitFileSystem();

  //VsSineTest();

  Mp3Reset();
  
}


void loop()
{
   Play();  
   while(1);
}


Woohoo for that, but now I want to designate a specific file to play when a certain button is pressed, pseudo code:

Code:
if(buttonState1 == HIGH){
Play(track001);
}
if(buttonState2 == HIGH){
Play(track002);
}
 

There is another library that says it can do just that: http://seeedstudio.com/wiki/File:Libraries_for_Music_Shield_20120619.zip
I tried this code:

Code:
//  File MusicPlayer.cpp
#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("Let Go");//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
}

No luck. Nothing happens, it does not play the track even though nothing in the SD card has changed. Has anyone else ran into this situation? Someone on the SeeedStudio forum had the same problem, http://www.seeedstudio.com/forum/viewtopic.php?f=16&t=2996 but the issue was never resolved. Thank you for any and all advice!
Logged

"It's Dr. Evil. I didn't spend six years in Evil Medical School to be called 'mister,' thank you very much."

Seattle, WA
Offline Offline
Full Member
***
Karma: 1
Posts: 225
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Bummer....
Logged

"It's Dr. Evil. I didn't spend six years in Evil Medical School to be called 'mister,' thank you very much."

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 224
Posts: 13921
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

no experience with the specific shield, but from your story I understand that the shield works with the first library but not with the second library.

Have you dived into the first lib as a quick look shows it has some means to play individual tracks.

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Seattle, WA
Offline Offline
Full Member
***
Karma: 1
Posts: 225
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah I took a look at it, but I'm on a deadline for this school project so I didn't have time to mess around with it anymore. I got a Sparkfun MP3 shield instead, and that's working now. Thanks though!
Logged

"It's Dr. Evil. I didn't spend six years in Evil Medical School to be called 'mister,' thank you very much."

Pages: [1]   Go Up
Jump to: