Seeed Music Shield

Hi
I’m trying to get a track play and stop using a piezo. I can get to play with the following code but the
player.opPause(); returns
‘undefined reference to `ctrlState’ error message

can you please point me in the right direction?
Cheers

#include <SD.h>
#include <SPI.h>
#include <arduino.h>
#include <MusicPlayer.h>
const int analogInPin = A4; // Analog input pin that the potentiometer is attached to
int sensorValue = 0;

void setup(void)
{
Serial.begin(9600);
player.begin(); //will initialize the hardware and set default mode to be normal.
player.addToPlaylist(“walking”);
player.setPlayMode(PM_REPEAT_LIST);
player.keyDisable(); //keys disable first;
player.analogControlEnable(); //enable to scan the A4/A5
//will initialize the hardware and set default mode to be normal.
player.attachAnalogOperation(A4, adjustVolume);

}
void loop(void)
{
adjustVolume();

}
void adjustVolume(void) //User-defined function
{

int sensorValue = analogRead(analogInPin);
Serial.println(sensorValue);

if (sensorValue >=10)
player.play();
else
player.opPause();

}

Hello,

Could you please let us know the

  1. Version of Music Shield you are using
  2. Which library/software is used implemented your application
  3. Arduino IDE version

to help you further.

The error might be due to not properly installing the library. If you are using older versions of Music Shield (i.e library), please use older version of Arduino IDE software mentioned in the wiki.

Warm Regards.

Hi
This is the set up

  1. Version of Music Shield you are using
    V2 with UNO
  2. Which library/software is used implemented your application
    V2
  3. Arduino IDE version
    v1.6.2

Hello,

Sorry for delay in replying. The software libraries for this version of Music shield was implemented using old version of Arduino software. Please download and use Arduino 1.0.x from github.com/Seeed-Studio/Music_Shield.

Let us know if you have further questions.

Thanks and Warm Regards.

Hi
You should include this on all the Music Shield instructions
Seed Music Shield needs Arduino 1.0.x to work

thanks