void setup() { Serial.begin(9600); } void loop() { // loop if the serial port have data to read while (Serial.available() > 0) { char c = Serial.read(); // read one character from the serial port Serial.write(c); // write the character through serial } }