//This program will echo back the word or text that is sent String vakk = ""; void setup() { Serial.begin(9600); // Initialize serial at 9600 baud while (!Serial); // Wait for serial port to connect (optional) } void loop() { if (Serial.available()) { char incoming = Serial.read(); if (incoming != '\n') { Serial.print(incoming); // print characters immediately without newline vakk += incoming; // build the string (if needed) } else { Serial.print(","); // print custom ending without newline Serial.print(" to you too!"); // print custom ending on same line Serial.println(); // finally print newline once vakk = ""; // reset string } } delay(10); }