@ -6,19 +6,19 @@ Read a line of text from the serial port.
|
||||
serial.readLine();
|
||||
```
|
||||
|
||||
#### ~hint
|
||||
### ~hint
|
||||
|
||||
This function expects the line it reads to be terminated with the `\r`
|
||||
character. If your terminal software does not terminate lines with
|
||||
`\r`, this function will probably never return a value.
|
||||
|
||||
#### ~
|
||||
### ~
|
||||
|
||||
### Returns
|
||||
## Returns
|
||||
|
||||
* a [string](/types/string) containing input from the serial port, such as a response typed by a user
|
||||
|
||||
### Example
|
||||
## Example
|
||||
|
||||
The following example requests the user's name, then repeats it to greet the user.
|
||||
|
||||
@ -31,7 +31,7 @@ basic.forever(() => {
|
||||
});
|
||||
```
|
||||
|
||||
### See also
|
||||
## See also
|
||||
|
||||
[serial](/device/serial),
|
||||
[serial write line](/reference/serial/write-line),
|
||||
|
Reference in New Issue
Block a user