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"
...
- Once created, you must call Port:open() to open the serial port connection.
Example
local serial = require "serial"
local COM1 = serial.Port("COM1")