> For the complete documentation index, see [llms.txt](https://arduino.doc.skyone.host/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://arduino.doc.skyone.host/core/serial/read.md).

# read

## 函数原型

```cpp
int HardwareSerial::read();
```

## 作用

向串口打印数据

`Serial.println()` 比 `Serial.print()` 多一个换行。

使用前必须用 `Serial.begin()` 初始化 `Serial`。

## 返回值

返回下一个字符串，就像C语言的 `getc()` 一样。

## 示例

```cpp
char c = Serial.read();
```
