> 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/standard/sensor/sound/readsoundvalue.md).

# readSoundValue(id)

获取声音传感器的声响强度

### 参数

| 参数名 | 类型            | 描述              |
| --- | ------------- | --------------- |
| id  | unsigned char | 要控制的ID号，范围0\~10 |

### 返回

| 参数名    | 类型  | 描述               |
| ------ | --- | ---------------- |
| number | int | 返回声响强度，范围0\~1023 |

### 例子

用uKitExplore v2板子控制声音传感器每隔400ms打印数值。

```c
#include "uKitExplore2.h"
void setup() {    
    Initialization();
}

void loop() {    
    Serial.println(readSoundValue(1));    
    delay(400);
}
```
