diff --git a/docs/reference/serial/write-line.md b/docs/reference/serial/write-line.md index b0aca910..d6c10912 100644 --- a/docs/reference/serial/write-line.md +++ b/docs/reference/serial/write-line.md @@ -1,14 +1,32 @@ -# Write Line +# Serial Write Line -Writes a string and a new line character (`\r\n`) to [serial](/device/serial). +Write a string to the [serial](/device/serial) port and start a new line of text +by writing `\r\n`. ```sig serial.writeLine(""); ``` +### Parameters + +* `line` is the [string](/reference/types/string) to write to the serial port + +### Example + +This program writes the word `BOFFO` to the serial port repeatedly. + +```blocks +basic.forever(() => { + serial.writeLine("BOFFO"); + basic.pause(5000); +}); +``` + ### Example: streaming data -The following example constantly checks the [compass heading](/reference/input/compass-heading) and sends the direction to serial. +This program checks the +[compass heading](/reference/input/compass-heading) and sends the +direction to the serial port repeatedly. ```blocks basic.forever(() => { @@ -26,8 +44,7 @@ basic.forever(() => { } }) ``` - ### See also -[serial](/device/serial), [write value](/reference/serial/write-value) - +[serial](/device/serial), +[serial write value](/reference/serial/write-value)