Serial Communication

Serial communication is used as the communication line between the Sparrow Link Hub and the connected computer. Set the name of the COM port, then open the communication line to the Hub, and Connect to the Sparrow Link Pulse Generator at the beginning of each script.

SetPort

SetPort
(
Port
,
)

Plug the Hub into your computer and find the COM port number for the device named “Silicon Labs CP210x USB to UART Bridge.” Install any necessary drivers.

Params
Port
string
required

The name of the COM port the Hub uses as a string. Example: SetPort(“COM1”)

required
Return Value

Open

Open
(
,
)

Opens the serial port to enable communication with the Hub.

Please note that you must use the SetPort() call to set the serial communication port prior to opening the line of communication.

Params
required
required
Return Value

Close

Close
(
,
)

Closes the serial port to disable communication with the Hub.

Params
required
required
Return Value