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