<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=%E8%9C%82%E9%B8%A3%E5%99%A8%E6%8A%A5%E8%AD%A6</id>
		<title>蜂鸣器报警 - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=%E8%9C%82%E9%B8%A3%E5%99%A8%E6%8A%A5%E8%AD%A6"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E8%9C%82%E9%B8%A3%E5%99%A8%E6%8A%A5%E8%AD%A6&amp;action=history"/>
		<updated>2026-04-21T17:58:58Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E8%9C%82%E9%B8%A3%E5%99%A8%E6%8A%A5%E8%AD%A6&amp;diff=10033&amp;oldid=prev</id>
		<title>Yanglibin@microduino.cc：/* 简介 */</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E8%9C%82%E9%B8%A3%E5%99%A8%E6%8A%A5%E8%AD%A6&amp;diff=10033&amp;oldid=prev"/>
				<updated>2015-09-07T02:32:31Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;简介&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;zh-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2015年9月7日 (一) 02:32的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot; &gt;第17行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第17行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==简介==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==简介==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;一般蜂鸣器分为有源蜂鸣器和无源蜂鸣器。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;一般蜂鸣器分为有源蜂鸣器和无源蜂鸣器。Microduino蜂鸣器采用的是无源蜂鸣器。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*有源蜂鸣器&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*有源蜂鸣器&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**内部有振荡、驱动电路。加电压信号（高电平）就可以响。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**内部有振荡、驱动电路。加电压信号（高电平）就可以响。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Yanglibin@microduino.cc</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E8%9C%82%E9%B8%A3%E5%99%A8%E6%8A%A5%E8%AD%A6&amp;diff=10030&amp;oldid=prev</id>
		<title>2015年9月6日 (日) 14:34 Yanglibin@microduino.cc</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E8%9C%82%E9%B8%A3%E5%99%A8%E6%8A%A5%E8%AD%A6&amp;diff=10030&amp;oldid=prev"/>
				<updated>2015-09-06T14:34:19Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;zh-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2015年9月6日 (日) 14:34的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l83&quot; &gt;第83行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第83行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;“for(int i=200;i&amp;lt;=800;i++)”说明：i的值开始为200，然后for函数执行一次i的值加1，直到i大于800时才退出for循环。用户可以更改相关参数观察蜂鸣器有啥变化。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;“for(int i=200;i&amp;lt;=800;i++)”说明：i的值开始为200，然后for函数执行一次i的值加1，直到i大于800时才退出for循环。用户可以更改相关参数观察蜂鸣器有啥变化。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;实验采用用for循环的方式来更改频率，从而持续发出不同的声音，达到了报警的效果。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;实验采用用for循环的方式来更改频率，从而持续发出不同的声音，达到了报警的效果。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==实验三：播放歌曲==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==实验三：播放歌曲==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l125&quot; &gt;第125行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第125行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;“song_play()”为播放音乐函数，“song[]”里面存放音调（频率），“noteDurations[]”为节拍。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;“song_play()”为播放音乐函数，“song[]”里面存放音调（频率），“noteDurations[]”为节拍。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;音乐由tone()函数控制，改动该函数即可改变音乐旋律，代码有两种形式分别为：tone(pin, frequency, duration)或tone(pin, frequency)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;音乐由tone()函数控制，改动该函数即可改变音乐旋律，代码有两种形式分别为：tone(pin, frequency, duration)或tone(pin, frequency)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;第一个函数中，pin代表连接扬声器的管脚，frequency代表发声频率，duration代表持续的时间，单位是毫秒。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;第一个函数中，pin代表连接扬声器的管脚，frequency代表发声频率，duration代表持续的时间，单位是毫秒。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;如果用第二个函数，则还需另外的noTone()函数来控制音乐的停止noTone(pin)。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;如果用第二个函数，则还需另外的noTone()函数来控制音乐的停止noTone(pin)。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;将激活后的电池盒与BM模块相连，将所有模块堆叠在一起，顺序随意，搭建完成。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/ins&gt;将激活后的电池盒与BM模块相连，将所有模块堆叠在一起，顺序随意，搭建完成。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:MicroduinoBuzzer-Equipment-ok.jpg|600px|center]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:MicroduinoBuzzer-Equipment-ok.jpg|600px|center]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Yanglibin@microduino.cc</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E8%9C%82%E9%B8%A3%E5%99%A8%E6%8A%A5%E8%AD%A6&amp;diff=10026&amp;oldid=prev</id>
		<title>2015年9月6日 (日) 14:30 Yanglibin@microduino.cc</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E8%9C%82%E9%B8%A3%E5%99%A8%E6%8A%A5%E8%AD%A6&amp;diff=10026&amp;oldid=prev"/>
				<updated>2015-09-06T14:30:40Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https//wiki.microduino.cn/index.php?title=%E8%9C%82%E9%B8%A3%E5%99%A8%E6%8A%A5%E8%AD%A6&amp;amp;diff=10026&amp;amp;oldid=9151&quot;&gt;显示更改&lt;/a&gt;</summary>
		<author><name>Yanglibin@microduino.cc</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E8%9C%82%E9%B8%A3%E5%99%A8%E6%8A%A5%E8%AD%A6&amp;diff=9151&amp;oldid=prev</id>
		<title>1304410487@qq.com：Created page with &quot; {| style=&quot;width: 800px;&quot; |- | ==目的==  本教程将教大家如何使用Microduino的蜂鸣器播放生日歌曲。  ==设备== *'''Microduino-CoreUSB/zh''' *'''Micr...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E8%9C%82%E9%B8%A3%E5%99%A8%E6%8A%A5%E8%AD%A6&amp;diff=9151&amp;oldid=prev"/>
				<updated>2015-08-04T08:00:54Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot; {| style=&amp;quot;width: 800px;&amp;quot; |- | ==目的==  本教程将教大家如何使用Microduino的蜂鸣器播放生日歌曲。  ==设备== *&amp;#039;&amp;#039;&amp;#039;&lt;a href=&quot;/index.php/Microduino-CoreUSB/zh&quot; title=&quot;Microduino-CoreUSB/zh&quot;&gt;Microduino-CoreUSB/zh&lt;/a&gt;&amp;#039;&amp;#039;&amp;#039; *&amp;#039;&amp;#039;&amp;#039;Micr...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==目的==&lt;br /&gt;
&lt;br /&gt;
本教程将教大家如何使用Microduino的蜂鸣器播放生日歌曲。&lt;br /&gt;
&lt;br /&gt;
==设备==&lt;br /&gt;
*'''[[Microduino-CoreUSB/zh]]'''&lt;br /&gt;
*'''[[Microduino-BUZZER/zh]]'''&lt;br /&gt;
*'''[[Microduino-Sensorhub/zh]]'''&lt;br /&gt;
&lt;br /&gt;
*其他硬件设备&lt;br /&gt;
**USB数据连接线   一根&lt;br /&gt;
&lt;br /&gt;
==蜂鸣器介绍==&lt;br /&gt;
一般蜂鸣器分为有源蜂鸣器和无源蜂鸣器，有源蜂鸣器是有极性的，类似LED发光二极管，长引脚接VCC，短引脚接GND，连接好就可以连续发出声音；而无源蜂鸣器没有极性，有三个引脚，两个电源引脚和一个音频输入引脚，因此需要接在音频输出电路中才能发声。而本次实验，使用的Microduino的蜂鸣器是无源蜂鸣器。&lt;br /&gt;
&lt;br /&gt;
==程序==&lt;br /&gt;
*程序代码&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
int song[] ={&lt;br /&gt;
    262,262,294,262,349,330,&lt;br /&gt;
    262,262,294,262,392,349,&lt;br /&gt;
    262,262,523,440,349,330,294,&lt;br /&gt;
    494,494,440,349,392,349&lt;br /&gt;
};&lt;br /&gt;
  &lt;br /&gt;
int noteDurations[] = { &lt;br /&gt;
  4,4,2,2,2,1,&lt;br /&gt;
  4,4,2,2,2,1,&lt;br /&gt;
  4,4,2,2,2,2,2,&lt;br /&gt;
  4,4,2,2,2,1&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  for (int thisNote = 0; thisNote&amp;lt;25;thisNote++)&lt;br /&gt;
  {&lt;br /&gt;
    int noteDuration = 1000/noteDurations[thisNote];&lt;br /&gt;
    tone(8, song[thisNote],noteDuration);&lt;br /&gt;
    int pauseBetweenNotes = noteDuration *1.30;&lt;br /&gt;
    delay(pauseBetweenNotes);&lt;br /&gt;
    noTone(8);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void loop() {&lt;br /&gt;
  setup();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*函数说明&lt;br /&gt;
Arduino板上产生的音乐由tone()函数控制，改动该函数即可改变音乐旋律，代码有两种形式分别为：tone(pin, frequency, duration)或tone(pin, frequency)&lt;br /&gt;
● 第一个函数中，pin代表连接扬声器的管脚，frequency代表发声频率，duration代表持续的时间，单位是毫秒。&lt;br /&gt;
● 如果用第二个函数，则还需另外的noTone()函数来控制音乐的停止noTone(pin)。&lt;br /&gt;
&lt;br /&gt;
==调试==&lt;br /&gt;
&lt;br /&gt;
步骤一：&lt;br /&gt;
把Microduino蜂鸣器插到Microduino-SensorHub的D8引脚。&lt;br /&gt;
[[File:MicroduinoBuzzerSensor.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
步骤二：&lt;br /&gt;
用USB线连接电脑，下载代码并烧录到Microduino-CoreUSB中。&lt;br /&gt;
[[File:MicroduinoBuzzerSensor1.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
步骤三：&lt;br /&gt;
加电就会听到歌曲。&lt;br /&gt;
[[File:MicroduinoBuzzerSensor2.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==结果==&lt;br /&gt;
&lt;br /&gt;
你可以通过蜂鸣器来播放音乐了。&lt;/div&gt;</summary>
		<author><name>1304410487@qq.com</name></author>	</entry>

	</feed>