connect
Establishes a serial link to a specified port, setting baud rate and line ending. If a link is already active, it closes it and establishes a new one.
Instructions
指定したシリアルポートに接続する。
port には list_ports で取得した device 名を指定する。
すでに接続中の場合は、内部で既存接続を閉じてから再接続する。
Args:
port: 接続ポート名 (例: /dev/cu.usbserial-10, COM3)
baudrate: 通信速度 (default: 19200)
line_ending: コマンド末尾に付加する改行コード
"
" (CR only, default) " " (CR+LF) " " (LF only)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | ||
| baudrate | No | ||
| line_ending | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |