self = port:setBaudRate(newBaudRate)
Sets the baud rate for the connection. By default connections are established at 115200 bauds. If a different value is desired, the new baud rate must be set before establishing a connecting to the port. Returns self.
Parameter |
Type |
Description |
---|---|---|
port |
in port object |
The port to modify. |
newBaudRate |
in number |
The new valid baud rate (please see table below). |
self |
out port object |
The input port is returned as the output. |
Valid baud rates can be set by using either the asi constant or their numeric value.
Constant |
Value# |
---|---|
asi.BAUD_RATE_9600 |
9600 bauds |
asi.BAUD_RATE_115200 |
115200 bauds |
asi.BAUD_RATE_DEFAULT |
115200 bauds |