Port:flush() method
Flush the serial communication Port, causing all buffered data to be sent now.
Return value
This method returns no value.Example
local serial = require "serial"
local COM1 = serial.Port("COM1")
if COM1:open() then
print("COM1 serial port is now open")
COM1:write("First message"):wait()
COM1:flush()
else
print("Failed to open COM1 serial port")
end