DFduino Player Module - HELP

Ok so im using the following code for my player module on the Arduino UNO v3:
Code: Select all
EDIT: The problem is the serial monitor is giving me numbers instead of "file not found" or "Play ok"#include <SoftwareSerial.h>
SoftwareSerial mp3player = SoftwareSerial(7,8); //RX, TX
void setup() {
// define pin modes for tx, rx, led pins:
pinMode(0, INPUT);
pinMode(1, OUTPUT);
digitalWrite(0, HIGH);
digitalWrite(1, HIGH);
// set the data rate for the SoftwareSerial port
Serial.begin(19200);
mp3player.begin(19200);
mp3player.println("\\:v 210\r\n");
Serial.print("i got: ");
Serial.println(mp3player.read());
mp3player.println("\\5\r\n");
Serial.print("i got: ");
Serial.println(mp3player.read());
}
void loop()
{
}
2013-06-27 01:05:19 note that you are reading char by char
http://arduino.cc/en/Reference/SoftwareSerialRead
if you want to read the whole string, you could to create a loop that will read all the data on the serial buffer and then print it out. otherwise, you are printing only the first char,
Also, make sure to convert it, if you are reading decimals or chars and so on..
Jose
http://arduino.cc/en/Reference/SoftwareSerialRead
if you want to read the whole string, you could to create a loop that will read all the data on the serial buffer and then print it out. otherwise, you are printing only the first char,
Also, make sure to convert it, if you are reading decimals or chars and so on..
