Due88:
String inputString = ""; // a string to hold incoming data
boolean stringComplete = false; // whether the string is complete
void setup() {
// initialize serial:
Serial.begin(9600);
Serial1.begin(9600);
// reserve 200 bytes for the inputString:
inputString.reserve(200);
}
void loop() {
// print the string when a newline arrives:
Serial1.print("REQUESTDATA\r");
delay(1000);
if (stringComplete) {
Serial.print(inputString);
// clear the string:
inputString = "";
stringComplete = false;
}
}
Is that snippet code? The example sketch from File->Examples->04.Communication->serialEvent comes with the serialEvent function in it. I don't see it in yours.
p