Port:constructor(port)constructor


The Port constructor returns a Port value representing a COM port.

Parameters

port

A string representing the COM port to be used : "COM1", "COM2"...

Notes

  • Once created, you must call Port:open() to open the serial port connection.

Return value

The constructor returns a new Port instance.

Example

--! luart-extensions import serial local COM1 = serial.Port("COM1")