device.exists
device.exists
Function
Determine whether the specified serial port exists in the system.
Syntax
device.exists(port)
Parameters
| Parameters | Type | Required | Default value | Description |
|---|---|---|---|---|
| port | String | No | None | Serial port name. |
Return value
| Type | Description |
|---|---|
| Bool | Returns true if it exists; returns false if it is not passed or does not exist. |
Example
result = device.exists('COM3') // Output: Bool echo(type(result))
Notes
- exists will perform a serial port scan.