<?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=%E7%AC%AC%E5%8D%81%E4%BA%94%E8%AF%BE--%E8%9C%82%E9%B8%A3%E5%99%A8%E8%AD%A6%E6%8A%A5%E5%99%A8%2Fzh</id>
		<title>第十五课--蜂鸣器警报器/zh - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=%E7%AC%AC%E5%8D%81%E4%BA%94%E8%AF%BE--%E8%9C%82%E9%B8%A3%E5%99%A8%E8%AD%A6%E6%8A%A5%E5%99%A8%2Fzh"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E4%BA%94%E8%AF%BE--%E8%9C%82%E9%B8%A3%E5%99%A8%E8%AD%A6%E6%8A%A5%E5%99%A8/zh&amp;action=history"/>
		<updated>2026-04-30T09:17:19Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E4%BA%94%E8%AF%BE--%E8%9C%82%E9%B8%A3%E5%99%A8%E8%AD%A6%E6%8A%A5%E5%99%A8/zh&amp;diff=7364&amp;oldid=prev</id>
		<title>1183296105@qq.com：/* 原理图 */</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E4%BA%94%E8%AF%BE--%E8%9C%82%E9%B8%A3%E5%99%A8%E8%AD%A6%E6%8A%A5%E5%99%A8/zh&amp;diff=7364&amp;oldid=prev"/>
				<updated>2015-01-22T09:10:01Z</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年1月22日 (四) 09:10的版本&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-l31&quot; &gt;第31行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第31行：&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:lesson15_04.jpg|600px|center|thumb]]&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:lesson15_04.jpg|600px|center|thumb]]&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;−&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;[[File:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;lesson15_05&lt;/del&gt;.jpg|600px|center|thumb]]&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;[[File:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;lesson15_5&lt;/ins&gt;.jpg|600px|center|thumb]]&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 colspan=&quot;2&quot;&gt;&amp;#160;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&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>1183296105@qq.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E4%BA%94%E8%AF%BE--%E8%9C%82%E9%B8%A3%E5%99%A8%E8%AD%A6%E6%8A%A5%E5%99%A8/zh&amp;diff=7357&amp;oldid=prev</id>
		<title>1183296105@qq.com：Created page with &quot;== 目的 == 玩了好久的LED了，今天开始，我们玩点新鲜的东西，今天我们来玩蜂鸣器，当然我光用蜂鸣器听个响大家肯定不答应，所以...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E4%BA%94%E8%AF%BE--%E8%9C%82%E9%B8%A3%E5%99%A8%E8%AD%A6%E6%8A%A5%E5%99%A8/zh&amp;diff=7357&amp;oldid=prev"/>
				<updated>2015-01-22T08:51:41Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== 目的 == 玩了好久的LED了，今天开始，我们玩点新鲜的东西，今天我们来玩蜂鸣器，当然我光用蜂鸣器听个响大家肯定不答应，所以...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== 目的 ==&lt;br /&gt;
玩了好久的LED了，今天开始，我们玩点新鲜的东西，今天我们来玩蜂鸣器，当然我光用蜂鸣器听个响大家肯定不答应，所以玩个比较简单，但稍微高端一点的，做一个防控警报类似的报警器。&lt;br /&gt;
== 设备 ==&lt;br /&gt;
== 设备 ==&lt;br /&gt;
[[Microduino-CoreSTM32/zh]]&lt;br /&gt;
&lt;br /&gt;
Microduino-CoreSTM32小巧精悍，其内核来自于ARM公司具有突破性的Cortex-M3内核的32位闪存微控制器。该内核是专门设计于满足集高性能、低功耗、实时应用、具有竞争性价格于一体的嵌入式领域的要求。&lt;br /&gt;
*其他硬件设备&lt;br /&gt;
:*面包板跳线     一盒&lt;br /&gt;
:*面包板         一块&lt;br /&gt;
:*无源蜂鸣器蜂鸣器   一个&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==蜂鸣器==&lt;br /&gt;
蜂鸣器是一种一体化结构的电子讯响器，采用直流电压供电，广泛应用于报警器、电子玩具、定时器等电子产品中作发声器件。&lt;br /&gt;
&lt;br /&gt;
===分类===&lt;br /&gt;
*'''蜂鸣器按工作原理主要分为两大类：'''压电式蜂鸣器和电磁式蜂鸣器。&lt;br /&gt;
:*压电式蜂鸣器主要由多谐振荡器、压电蜂鸣片、阻抗匹配器及共鸣箱、外壳等组成。 如下图：&lt;br /&gt;
:*电磁式蜂鸣器由振荡器、电磁线圈、磁铁、振动膜片及外壳等组成。&lt;br /&gt;
[[File:lesson15_01.jpg|600px|center|thumb]]&lt;br /&gt;
*'''蜂鸣器音源类型：'''分有源和无源两大类。如下图左边为有源蜂鸣器，右边为无源蜂鸣器。&lt;br /&gt;
[[File:lesson15_02.jpg|600px|center|thumb]]&lt;br /&gt;
:*“有源”的蜂鸣器内部装有集成电路，不需音频驱动电路，只要接通直流电源就能直接发出声响；&lt;br /&gt;
:*“无源”只有外加音频驱动信号才能发出声响。  &lt;br /&gt;
'''分别:'''&lt;br /&gt;
:*外观上看，两种蜂鸣器好像一样，但仔细看，两者的高度略有区别，有源蜂鸣器高度为9mm，而无源蜂鸣器的高度为8mm。&lt;br /&gt;
:*如将两种蜂鸣器的引脚郡朝上放置时，可以看出有绿色电路板的一种是无源蜂鸣器，没有电路板而用黑胶封闭的一种是有源蜂鸣器。&lt;br /&gt;
[[File:lesson15_03.jpg|600px|center|thumb]]&lt;br /&gt;
'''蜂鸣器外型分类:'''引线式蜂鸣器、插针式蜂鸣器和贴片蜂鸣器和贴片蜂鸣器。如下图从做到右一次是引线式、插针式和贴片式蜂鸣器。&lt;br /&gt;
[[File:lesson15_04.jpg|600px|center|thumb]]&lt;br /&gt;
== 原理图 ==&lt;br /&gt;
[[File:lesson15_05.jpg|600px|center|thumb]]&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 pin=2;;&lt;br /&gt;
void rate(int i)     //set frequency of the buzzer&lt;br /&gt;
{&lt;br /&gt;
  long  us=1000000/i;&lt;br /&gt;
  digitalWrite(pin,HIGH); //the buzzer sounds&lt;br /&gt;
  delayMicroseconds(us); &lt;br /&gt;
  digitalWrite(pin,LOW); &lt;br /&gt;
  delayMicroseconds(us); &lt;br /&gt;
}&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
    pinMode(pin, OUTPUT);&lt;br /&gt;
}&lt;br /&gt;
void loop() &lt;br /&gt;
{&lt;br /&gt;
  for(int i=300;i&amp;lt;=1500;i++) //the frequency is increasing &lt;br /&gt;
  {&lt;br /&gt;
    rate(i);&lt;br /&gt;
    delay(5);&lt;br /&gt;
  }&lt;br /&gt;
  for(int i=1500;i&amp;gt;=300;i--)//the frequency is decreasing &lt;br /&gt;
  {&lt;br /&gt;
    rate(i);&lt;br /&gt;
    delay(7);&lt;br /&gt;
  }&lt;br /&gt;
  delay(4000);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 调试 ==&lt;br /&gt;
把代码拷贝到Maple IDE，编译程序，下载程序。&lt;br /&gt;
&lt;br /&gt;
== 结果 ==&lt;br /&gt;
程序下载完毕就可听到报警声了。&lt;br /&gt;
== 视频 ==&lt;/div&gt;</summary>
		<author><name>1183296105@qq.com</name></author>	</entry>

	</feed>