差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
wm_wiki:sound_sensor:manual [2020/02/20 17:07] juneral [2、参数规格] |
wm_wiki:sound_sensor:manual [2020/05/12 14:31] (当前版本) juneral |
||
---|---|---|---|
行 3: | 行 3: | ||
===== 1. 简要概述 ===== | ===== 1. 简要概述 ===== | ||
<html><body> | <html><body> | ||
+ | <p class=MsoTitle align=left style='text-align:left;text-indent:36.0pt'><span | ||
+ | style='font-size:16.0pt;font-family:宋体;color:#222222;letter-spacing:0pt; | ||
+ | background:white'>声音传感器(<span lang=EN-US>Sound Sensor</span>)以麦克风为基础(<b><span | ||
+ | style='background:yellow'>将声信号转换为电信号</span></b>),其可用来对周围环境中的声音强度进行检测,检测到的音量通过运算放大器放大,然后传输给主控处理。使用它可做一些交互性项目,例如声控开关,音量控制小车竞速等。</span><span | ||
+ | lang=EN-US> </span></p> | ||
</body></html> | </body></html> | ||
===== 2. 参数规格 ===== | ===== 2. 参数规格 ===== | ||
行 213: | 行 217: | ||
padding:0cm 5.4pt 0cm 5.4pt;height:12.95pt'> | padding:0cm 5.4pt 0cm 5.4pt;height:12.95pt'> | ||
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US><img | <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US><img | ||
- | width=249 height=227 id="图片 1" src="https://www.weeemake.com.cn/wiki/lib/exe/fetch.php?media=wm_wiki:sound_sensor:pasted:20200220-164947.png"></span></p> | + | width=249 height=227 id="图片 1" src="lib/exe/fetch.php?media=wm_wiki:sound_sensor:pasted:20200220-164947.png"></span></p> |
</td> | </td> | ||
</tr> | </tr> | ||
行 236: | 行 240: | ||
</body></html> | </body></html> | ||
- | <sxh cpp; first-line: 1;highlight: [89,92]; title: sound_sensor_test.ino> | + | <sxh cpp; first-line: 1;highlight: [7,11]; title: sound_sensor_test.ino> |
#include<WeELF328P.h> | #include<WeELF328P.h> | ||
行 244: | 行 248: | ||
void setup(){ | void setup(){ | ||
- | pinMode(PORT_3, INPUT); | + | pinMode(PORT_3, INPUT); |
} | } | ||
void loop(){ | void loop(){ | ||
- | value = analogRead(PORT_3); | + | value = analogRead(PORT_3); |
- | seven_segment_A.showNumber(value); | + | seven_segment_A.showNumber(value); |
- | delay(100); | + | delay(100); |
} | } | ||
| |