system.serial.readLine

Description

Read one line from a serial port.

Syntax

system.serial. readLine( port [, timeout] [, encoding] )

  • Parameters

String port - The previously configured serial port to use.

int timeout - Maximum amount of time, in milliseconds, to block before returning. Default is 5000. [optional]

String encoding - The String encoding to use. Default is UTF8. [optional]

  • Returns

String - A line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a line feed.

  • Scope

All

Code Examples

There are no examples associated with this scripting function.