# Read char over serial \[SOLVED\]

**URL:** <https://forum.arduino.cc/t/read-char-over-serial-solved/153697>\
**Category:** Programming\
**Created:** [March 30, 2013, 8:21pm UTC](https://forum.arduino.cc/t/read-char-over-serial-solved/153697 "2013-03-30T20:21:11Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![zoomkat](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zoomkat/32/1190177_2.png) [@zoomkat](https://forum.arduino.cc/u/zoomkat)\
**Post date:** [March 30, 2013, 9:41pm UTC](https://forum.arduino.cc/t/read-char-over-serial-solved/153697/6 "2013-03-30T21:41:37Z")

</div>

Very simple string capture.

```cpp
// zoomkat 7-30-11 serial I/O string test
// type a string in serial monitor. then send or enter
// for IDE 0019 and later

String readString;

void setup() {
  Serial.begin(9600);
  Serial.println("serial test 0021"); // so I can keep track of what is loaded
}

void loop() {

  while (Serial.available()) {
    delay(2);  //delay to allow byte to arrive in input buffer
    char c = Serial.read();
    readString += c;
  }

  if (readString.length() >0) {
    Serial.println(readString);

    readString="";
  } 
}

```

---

_[View the full topic](https://forum.arduino.cc/t/read-char-over-serial-solved/153697)._
