Arduino Read Serial Snippet
void setup() {
Serial.begin(9600);
}
void loop() {
if (Serial.available() > 0) {
String buffer = ""; //empty buffer
do {
char c = Serial.read();
delay(5);
buffer += c;
} while (Serial.available() > 0);
Serial.println("String readed from Serial: \"" + buffer + "\"");
}
}