# Arduino and Vmusic2 Not working AHHHHHH!



## 5artist5 (Jul 10, 2007)

Ok im starting to go insane.
Iv been working all day to make an arduino trigger the vmusic 2.
Any help would be great!

#include <SoftwareSerial.h>

#define ledPinB 13
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 12; // the number of the LED pin

// variables will change:
int buttonState = 0; // variable for reading the pushbutton status

void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT); 
pinMode(ledPinB, OUTPUT);

pinMode(buttonPin, INPUT);

Serial.begin(9600); 
}

void loop(){
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);

// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) { 
// turn LED on: 
digitalWrite(ledPin, HIGH);

Serial.print("VPF test.mp3");
Serial.print(13,BYTE);
delay(5000); //wait five seconds
Serial.print("VST"); //stop playing
Serial.print(13,BYTE);

}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}


----------



## pshort (May 6, 2008)

Has it ever worked for you?


----------



## 5artist5 (Jul 10, 2007)

I have vmusic units running with prop1s but this is the first time i have tried to get one to work with an arduino.


----------



## pshort (May 6, 2008)

While I have a VMUSIC2, I've never powered it up.

However, I'll still toss a few suggestions out:

1) Some of the example software on the internet show the processor setting the output volume of the VMUSIC using the VSV command. Perhaps the VMUSIC is outputting at a volume too low for you to hear.

2) Are you driving the CTS input signal to the VMUSIC low?

3) Are you using the simplest possible mp3 format (128k bps, fixed rate sampling, etc)?

4) Perhaps the music filename needs to be in all capital letters, and the USB stick needs to be formatted with FAT16. Also, try using a small USB stick, under 1GB.

This is all just wild, uneducated speculation on my part, but maybe changing one of these things might fix the problem.


----------



## lostskeleton (Aug 30, 2011)

Here is some code from someone doing something just like you. You might have already seen it.. http://www.arduino.cc/playground/Main/VMUSIC


----------

