void setup() { Serial.begin(9600); while(!Serial){ ; } Serial.println("ready"); } //------------------------------------------- String text=""; //------------------------------------------- void loop() { while (!textReady){ parse(); } Serial.println(text); textReady = false; text = ""; } //------------------------------------------- //saves all text until carridge return in "txt" variable //------------------------------------------- void parse(){ while(Serial.available()){ char tmp = Serial.read(); if (tmp=='\r'){ //Serial.println(text); textReady = true; } text += (char)tmp; } }