Module jls.io.Serial

Provides serial input/output communication.

Class Serial

serial:readStart (stream) Starts reading data on this serial device.
serial:readStop () Stops reading data on this serial device.
serial:write (data) Writes data on this serial device.
serial:close () Closes this serial device.
Serial.open (name, options) Returns a new Serial for the specified name.


Class Serial

A Serial class. A Serial instance represents a serial device.
serial:readStart (stream)
Starts reading data on this serial device.

Parameters:

serial:readStop ()
Stops reading data on this serial device.
serial:write (data)
Writes data on this serial device.

Parameters:

  • data string the data to write.
serial:close ()
Closes this serial device.
Serial.open (name, options)
Returns a new Serial for the specified name.

Parameters:

  • name string The name of the serial device to open.
  • options The serial options.
    • baudRate number The baud rate.
    • dataBits number The number of bits transmitted and received.
    • stopBits number The number of stop bits to be used.
    • parity number The parity scheme, 0 for no parity.

Returns:

    a new Serial or nil.
generated by LDoc 1.4.6 Last updated 2022-01-29 17:26:36