> For the complete documentation index, see [llms.txt](https://ubtechedu.gitbook.io/chinese/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ubtechedu.gitbook.io/chinese/arduino-language/functions/communication/begin.md).

# Serial.begin(speed)

将串行数据传输速率设置为位/秒（波特）。

### 参数

| 参数名   | 描述       |
| ----- | -------- |
| speed | 位/秒 (波特) |

### 例子 <a href="#li-zi" id="li-zi"></a>

```c
void setup() {
    Serial.begin(9600); // 打开串口，设置数据传输速率为9600bps 
}
 
void loop() {
```
