write Line
Write a line of text to the serial port.
serial.writeLine("");
A line of text is string that has two special characters added at the end: carriage return
and line feed. These characters are really just codes that mean start a new line.
Sometimes they appear in code as "\r\n"
.
After using a ||serial:write line||
, any new text written to the serial port will begin on a new line.
With ||serial:write line||
, the new line characters are automatically added for you. You only need to
give the text you want to write.
Parameters
- text: the string to write to the serial port
Example
Write two greeting messages to the serial port.
serial.writeLine("How are you today?");
pause(5000);
serial.writeLine("Well that's great! I'm doing well too.");
See also
write number, write string, write value
serial