pxt-calliope/docs/reference/serial/read-string.md
Sam El-Husseini e3975e65e5 pxt-microbit Accessibility PR (#529)
* Accessibility changes
2017-09-07 13:42:08 -07:00

28 lines
521 B
Markdown

# Serial Read String
Read the buffered serial data as a string
```sig
serial.readString();
```
## Returns
* a [string](/types/string) containing input from the serial port. Empty if no data available.
## Example
The following program scrolls text on the screen as it arrives from serial.
```blocks
basic.forever(() => {
basic.showString(serial.readString());
});
```
## See also
[serial](/device/serial),
[serial write line](/reference/serial/write-line),
[serial write value](/reference/serial/write-value)