Jump to content


Photo

Music Shield 1.2 example not working

music shield

  • Please log in to reply
13 replies to this topic

#1 guigro

guigro

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 21 August 2015 - 05:17 PM

Hello !!

 

I just bought your Music Shield v1.2 and can't find a way to make it work.

 

I have an input device (that I don't know how to connect to the Arduino as the shield takes all the pins, do you have an hint on that ?) and I followed all steps given on your Wiki and Tutorial.

 

First I got errors about the WProgram.h not found, I replaced it with Arudino.h

Then I got errors with the NewSoftSerial.h that I replaced with SoftwareSerial.h

 

Then I get a looot of errors.

 

Is there any update ? It seems the code are made for Arduino 1.0 as I'm running 1.7.6

 

Thanks a lot !
Regards,
Guillaume


  • carpinteyrolkh likes this

#2 LS-Support-12

LS-Support-12

    Forum Support

  • Moderators
  • 326 posts

Posted 21 August 2015 - 07:05 PM

 

...and I followed all steps given on your Wiki and Tutorial.

Could you just provide links on Wiki and Tutorial you followed?



#3 guigro

guigro

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 21 August 2015 - 07:32 PM

Of course !

 

I followed this one : http://linksprite.co...eld_for_Arduino

(I tried both 1.14 and 1.17)

 

And this one : http://learn.linkspr...ld-for-arduino/

 

Are those not the good ones ?

 

Thanks !


  • LS-Support-12 and guigro like this

#4 guigro

guigro

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 24 August 2015 - 05:49 AM

Hello !

 

I saw you liked my post, but where can I find an update ?

 

Thanks :)



#5 cwilt

cwilt

    Advanced Member

  • Members
  • PipPipPip
  • 1,012 posts

Posted 25 August 2015 - 01:20 AM

Wprogram.h and Arduino.h?  Are you using an Arduino or pcDuino?



#6 guigro

guigro

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 25 August 2015 - 11:51 AM

Hi !

 

I use an Arduino.

 

I downloaded the files from the Wiki, changed the libraries and the portpin file.

 

Then I tried to compile the music example, got errors from WProgram.h.

I changed all occurences of WProgram.h to Arduino.h

 

And I got errors from NewSoftSerial

I changed all occurences of NewSoftSerial to SoftwareSerial

 

Then I got errors from the 1.17 version of the library.

I deleted this library to be sure not to have conflict.

Youpi I was able to compile the program and send it to my Arduino !

 

But... I'm sure there is a .wav file in the SD card.

And when I put the Arduino to ON, when I press to play nothing happens (I tried to put the volume up and everything I could have done).

 

How can I make it work ?

Thanks !

Regards,

Guillaume



#7 guigro

guigro

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 27 August 2015 - 04:39 PM

Hello team !

 

Any hint to help me make it works ?

 

Thanks !

Regards,

Guillaume



#8 guigro

guigro

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 31 August 2015 - 01:58 PM

Hello guys,

 

just want to tell you I found why it did not worked : I used a 4gb SD Card instead of a 2gb one...


  • LS-Support-12 likes this

#9 cwilt

cwilt

    Advanced Member

  • Members
  • PipPipPip
  • 1,012 posts

Posted 31 August 2015 - 02:58 PM

Great news. Glad you got it solved.

#10 chain

chain

    Advanced Member

  • Members
  • PipPipPip
  • 756 posts

Posted 02 September 2015 - 01:54 AM

To follow this tutorial: http://learn.linkspr...ld-for-arduino/

 

You can download Arduino 0022 to have a try: http://arduino.googl...rduino-0022.zip



#11 guigro

guigro

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 02 September 2015 - 05:31 PM

Hi !

Thanks for your answers :)

 

I managed to make it work.

 

Altough I have a question :

 

I would like to trigger Play and Pause regarding an INPUT.

 

It's a magnetic switch, and I would like to :

- If the switch is closed : play the music

- If the switch is open : pause the music OR mute the volume

 

But I can't manage to do it. My switch is showing 1 and 0 well (so it's working), but nothing happens to the sound.

Can you help me with that ?

For information : I use an Arduino Mega

 

Thanks a lot !

 

Here if my 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()
{
  pinMode(24,INPUT);
  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()
{ 
 if (digitalRead(24) == 0) {
  
  Mp3SetVolume(0,0);
 
 Play();
 }
 
 if(digitalRead(24) == 1) {
 
  Mp3SetVolume(40,40);
  } 
  
  Serial.println(digitalRead(24));
  
}

  • LS-Support-12 likes this

#12 chain

chain

    Advanced Member

  • Members
  • PipPipPip
  • 756 posts

Posted 07 September 2015 - 09:15 AM

We have not got that kind of tutorial, but I think you can refer to the shield's schematics to see how does the button got "Pase" and "Play" to work.

 

Here is the schematics: https://s3.amazonaws...usic_Shield.pdf



#13 LS-Support-12

LS-Support-12

    Forum Support

  • Moderators
  • 326 posts

Posted 27 September 2015 - 05:26 AM

Altough I have a question :

 

I would like to trigger Play and Pause regarding an INPUT.

 

It's a magnetic switch, and I would like to :

- If the switch is closed : play the music

- If the switch is open : pause the music OR mute the volume

 

But I can't manage to do it. My switch is showing 1 and 0 well (so it's working), but nothing happens to the sound.

Can you help me with that ?

For information : I use an Arduino Mega

 

Just to make it straight:

 

You are using Arduino Mega and music shield. You managed to make music shield work and it is playing music without problems? Now you want to control that playing (play/pause/mute) with a switch?



#14 guigro

guigro

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 27 September 2015 - 10:57 AM

Hello !

 

It's exactly that !

I managed to do it regarding a modification of the code I found over the web.

Let me try to find that link again :)

 

Thanks a lot for your support !

Regards,

Guillaume


  • LS-Support-12 likes this





Also tagged with one or more of these keywords: music, shield

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users