serial.close
serial.close
Function
Close the open serial port.
Syntax
device.open(config).close()
Parameters
No parameters.
Return value
| Type | Description |
|---|---|
| Bool | Returns true if the shutdown is successful. |
Example
port = device.open({type: 'serial', port: 'COM3'}) result = port.close() // Output: true print result
Notes
- The handle remains the Device value after closing, but the underlying port is closed.