<?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=%E6%B8%A9%E5%BA%A6%E4%BC%A0%E6%84%9F%E5%99%A8</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=%E6%B8%A9%E5%BA%A6%E4%BC%A0%E6%84%9F%E5%99%A8"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E6%B8%A9%E5%BA%A6%E4%BC%A0%E6%84%9F%E5%99%A8&amp;action=history"/>
		<updated>2026-04-21T13:25:29Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E6%B8%A9%E5%BA%A6%E4%BC%A0%E6%84%9F%E5%99%A8&amp;diff=7402&amp;oldid=prev</id>
		<title>1183296105@qq.com：/* 原理 */</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E6%B8%A9%E5%BA%A6%E4%BC%A0%E6%84%9F%E5%99%A8&amp;diff=7402&amp;oldid=prev"/>
				<updated>2015-01-24T12:37:32Z</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月24日 (六) 12:37的版本&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-l30&quot; &gt;第30行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第30行：&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;:* +8bit校验和&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;:* +8bit校验和&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;数据传送正确时校验和数据等于“ 8bit湿度整数数据+8bit湿度小数数据+8bi温度整数数据+8bit温度小数数据” 所得结果的末8位。&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;数据传送正确时校验和数据等于“ 8bit湿度整数数据+8bit湿度小数数据+8bi温度整数数据+8bit温度小数数据” 所得结果的末8位。&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;sensor_3&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;sensor_03&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;总线空闲状态为高电平,主机把总线拉低等待DHT11响应,主机把总线拉低必须大于18毫秒,保证DHT11能检测到起始信号。DHT11接收到主机的开始信号后,等待主机开始信号结束,然后发送80us低电平响应信号.主机发送开始信号结束后,延时等待20-40us后, 读取DHT11的响应信号,主机发送开始信号后,可以切换到输入模式,或者输出高电平均可, 总线由上拉电阻拉高。&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;总线空闲状态为高电平,主机把总线拉低等待DHT11响应,主机把总线拉低必须大于18毫秒,保证DHT11能检测到起始信号。DHT11接收到主机的开始信号后,等待主机开始信号结束,然后发送80us低电平响应信号.主机发送开始信号结束后,延时等待20-40us后, 读取DHT11的响应信号,主机发送开始信号后,可以切换到输入模式,或者输出高电平均可, 总线由上拉电阻拉高。&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;sensor_4&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;sensor_04&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;总线为低电平,说明DHT11发送响应信号,DHT11发送响应信号后,再把总线拉高80us,准备发送数据,每一bit数据都以50us低电平时隙开始,高电平的长短定了数据位是0还是1.格式见下面图示.如果读取响应信号为高电平,则DHT11没有响应,请检查线路是否连接正常.当最后一bit数据传送完毕后，DHT11拉低总线50us,随后总线由上拉电阻拉高进入空闲状态。&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;总线为低电平,说明DHT11发送响应信号,DHT11发送响应信号后,再把总线拉高80us,准备发送数据,每一bit数据都以50us低电平时隙开始,高电平的长短定了数据位是0还是1.格式见下面图示.如果读取响应信号为高电平,则DHT11没有响应,请检查线路是否连接正常.当最后一bit数据传送完毕后，DHT11拉低总线50us,随后总线由上拉电阻拉高进入空闲状态。&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:sensor_5_1.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:sensor_5_1.jpg|600px|center|thumb]]&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-l38&quot; &gt;第38行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第38行：&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;[[File:sensor_6.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:sensor_6.jpg|600px|center|thumb]]&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;&amp;lt;source lang=&amp;quot;cpp&amp;quot;&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 lang=&amp;quot;cpp&amp;quot;&amp;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=%E6%B8%A9%E5%BA%A6%E4%BC%A0%E6%84%9F%E5%99%A8&amp;diff=7397&amp;oldid=prev</id>
		<title>1183296105@qq.com：/* 结果 */</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E6%B8%A9%E5%BA%A6%E4%BC%A0%E6%84%9F%E5%99%A8&amp;diff=7397&amp;oldid=prev"/>
				<updated>2015-01-24T12:34:20Z</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月24日 (六) 12: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-l147&quot; &gt;第147行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第147行：&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;*步骤四：在DHT11传感器附近增加湿度和提高温度，观察数据的变化。&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;*步骤四：在DHT11传感器附近增加湿度和提高温度，观察数据的变化。&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;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;串口监视界面显示结果如下图所示。在给DHT11传感器附近加湿、升温后湿度和温度明显增加。&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;串口监视界面显示结果如下图所示。在给DHT11传感器附近加湿、升温后湿度和温度值明显增加。&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;[[File:sensor_8.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:sensor_8.jpg|600px|center|thumb]]&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;/table&gt;</summary>
		<author><name>1183296105@qq.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E6%B8%A9%E5%BA%A6%E4%BC%A0%E6%84%9F%E5%99%A8&amp;diff=7396&amp;oldid=prev</id>
		<title>1183296105@qq.com：Created page with &quot;== '''目的''' == 本教程将教大家使用DHT11温湿度传感器，结果通过虚拟USB串口打印显示出来。DHT11温湿度传感器是一款含有以校准数字...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E6%B8%A9%E5%BA%A6%E4%BC%A0%E6%84%9F%E5%99%A8&amp;diff=7396&amp;oldid=prev"/>
				<updated>2015-01-24T12:33:53Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== &amp;#039;&amp;#039;&amp;#039;目的&amp;#039;&amp;#039;&amp;#039; == 本教程将教大家使用DHT11温湿度传感器，结果通过虚拟USB串口打印显示出来。DHT11温湿度传感器是一款含有以校准数字...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== '''目的''' ==&lt;br /&gt;
本教程将教大家使用DHT11温湿度传感器，结果通过虚拟USB串口打印显示出来。DHT11温湿度传感器是一款含有以校准数字信号输出的温湿度符合型传感器。&lt;br /&gt;
== '''设备''' ==&lt;br /&gt;
*'''[[ Microduino-CoreSTM32]]'''&lt;br /&gt;
Microduino-CoreSTM32是采用 STM32F103CBT6芯片的ARM开发板，采用独特的Upin7接口，大小与一枚一元硬币差不多大，完全兼容Microduino其他扩展模块。&lt;br /&gt;
*其他硬件设备&lt;br /&gt;
**面包板跳线  	      一盒  &lt;br /&gt;
**面包板  	      一块  &lt;br /&gt;
**DHT11温湿度传感器   一个&lt;br /&gt;
**USB数据连接线       一根&lt;br /&gt;
**1K欧姆电阻          1 个&lt;br /&gt;
[[File:sensor_1.jpg|600px|center|thumb]]&lt;br /&gt;
== '''原理''' ==&lt;br /&gt;
DHT11温湿度传感器外形以及引脚功能如下图所示，其中N.C.悬空。&lt;br /&gt;
[[File:sensor_2.jpg|600px|center|thumb]]&lt;br /&gt;
'''DHT11数字温湿度传感器技术参数'''&lt;br /&gt;
**供电电压： 3.3~5.5V DC&lt;br /&gt;
**全量程标定，单线数字输出；&lt;br /&gt;
**湿度测量范围：20％～90%RH(0－50℃温度补偿）；&lt;br /&gt;
**温度测量范围：0～+50℃；&lt;br /&gt;
**湿度测量精度：±5.0%RH&lt;br /&gt;
**温度测量精度：±2.0℃&lt;br /&gt;
**响应时间：&amp;lt;5s；&lt;br /&gt;
**低功耗&lt;br /&gt;
''' 数据传输格式 '''&lt;br /&gt;
DHT11的DATA线用于微处理器与 DHT11之间的通讯和同步,采用单总线数据格式,一次通讯时间4ms左右,数据分小数部分和整数部分。&lt;br /&gt;
*一次完整的数据传输为40bit,高位先出。&lt;br /&gt;
:*8bit湿度整数数据+8bit湿度小数数据&lt;br /&gt;
:*+8bi温度整数数据+8bit温度小数数据&lt;br /&gt;
:* +8bit校验和&lt;br /&gt;
数据传送正确时校验和数据等于“ 8bit湿度整数数据+8bit湿度小数数据+8bi温度整数数据+8bit温度小数数据” 所得结果的末8位。&lt;br /&gt;
[[File:sensor_3.jpg|600px|center|thumb]]&lt;br /&gt;
总线空闲状态为高电平,主机把总线拉低等待DHT11响应,主机把总线拉低必须大于18毫秒,保证DHT11能检测到起始信号。DHT11接收到主机的开始信号后,等待主机开始信号结束,然后发送80us低电平响应信号.主机发送开始信号结束后,延时等待20-40us后, 读取DHT11的响应信号,主机发送开始信号后,可以切换到输入模式,或者输出高电平均可, 总线由上拉电阻拉高。&lt;br /&gt;
[[File:sensor_4.jpg|600px|center|thumb]]&lt;br /&gt;
总线为低电平,说明DHT11发送响应信号,DHT11发送响应信号后,再把总线拉高80us,准备发送数据,每一bit数据都以50us低电平时隙开始,高电平的长短定了数据位是0还是1.格式见下面图示.如果读取响应信号为高电平,则DHT11没有响应,请检查线路是否连接正常.当最后一bit数据传送完毕后，DHT11拉低总线50us,随后总线由上拉电阻拉高进入空闲状态。&lt;br /&gt;
[[File:sensor_5_1.jpg|600px|center|thumb]]&lt;br /&gt;
[[File:sensor_5_2.jpg|600px|center|thumb]]&lt;br /&gt;
本教程的实验原理图如下图所示：&lt;br /&gt;
[[File:sensor_6.jpg|600px|center|thumb]]&lt;br /&gt;
== '''程序''' ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#define DHT_PIN   2   // define the data exchange pin &lt;br /&gt;
byte ERROR;           //ERROR flag &lt;br /&gt;
byte dht_dat[5];    //define a receive data buffer &lt;br /&gt;
                    //the first byte is the  mantissa of the humidity&lt;br /&gt;
                    //the second byte is the fraction of the humidity&lt;br /&gt;
                    //the third byte is the mantissa of the temperature&lt;br /&gt;
                    //the fourth byte is the fraction of the temperature&lt;br /&gt;
                    //the fifth byte is a checksum byte &lt;br /&gt;
void setup() &lt;br /&gt;
{&lt;br /&gt;
  pinMode(DHT_PIN,OUTPUT);&lt;br /&gt;
  digitalWrite(DHT_PIN,HIGH);  //idle state is high of the data exchange pin&lt;br /&gt;
}&lt;br /&gt;
void loop() &lt;br /&gt;
{&lt;br /&gt;
    ReadDHT();    //read the value of the humidity and the temperature&lt;br /&gt;
    switch(ERROR)&lt;br /&gt;
    {&lt;br /&gt;
      case 0:     // normal condition&lt;br /&gt;
          SerialUSB.print(&amp;quot;Current humidity = &amp;quot;);&lt;br /&gt;
          SerialUSB.print(dht_dat[0],DEC);&lt;br /&gt;
          SerialUSB.print(&amp;quot;.&amp;quot;);&lt;br /&gt;
          SerialUSB.print(dht_dat[1],DEC);&lt;br /&gt;
          SerialUSB.print(&amp;quot; %  &amp;quot;);&lt;br /&gt;
          SerialUSB.print(&amp;quot;temperature = &amp;quot;);&lt;br /&gt;
          SerialUSB.print(dht_dat[2],DEC);&lt;br /&gt;
          SerialUSB.print(&amp;quot;.&amp;quot;);&lt;br /&gt;
          SerialUSB.print(dht_dat[3],DEC);&lt;br /&gt;
          SerialUSB.println(&amp;quot; C&amp;quot;);&lt;br /&gt;
          break;&lt;br /&gt;
       case 1:&lt;br /&gt;
          SerialUSB.println(&amp;quot;Error 1:DHT start condition 1 not met.&amp;quot;);&lt;br /&gt;
          break;&lt;br /&gt;
       case 2:&lt;br /&gt;
          SerialUSB.println(&amp;quot;Error 2:DHT start condition 2 not met.&amp;quot;);&lt;br /&gt;
          break;&lt;br /&gt;
       case 3:&lt;br /&gt;
          SerialUSB.println(&amp;quot;Error 3:DHT check error.&amp;quot;);&lt;br /&gt;
          break;&lt;br /&gt;
       default:&lt;br /&gt;
          SerialUSB.println(&amp;quot;Error 3:Unrecongnized code error.&amp;quot;);&lt;br /&gt;
          break;&lt;br /&gt;
    }&lt;br /&gt;
    delay(3000);          // Wait for 1 second (1000 milliseconds)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ReadDHT()   //initialize the DHT11 sensor &lt;br /&gt;
{&lt;br /&gt;
  ERROR=0;&lt;br /&gt;
  byte dht_in;&lt;br /&gt;
  byte i;&lt;br /&gt;
  digitalWrite(DHT_PIN,LOW);&lt;br /&gt;
  delay(20);&lt;br /&gt;
  digitalWrite(DHT_PIN,HIGH);&lt;br /&gt;
  delayMicroseconds(40);&lt;br /&gt;
  pinMode(DHT_PIN,INPUT);&lt;br /&gt;
  dht_in=digitalRead(DHT_PIN);&lt;br /&gt;
  if(dht_in)&lt;br /&gt;
  {&lt;br /&gt;
    ERROR=1;&lt;br /&gt;
    return ;&lt;br /&gt;
  }&lt;br /&gt;
  delayMicroseconds(80);&lt;br /&gt;
  dht_in=digitalRead(DHT_PIN);&lt;br /&gt;
  if(!dht_in)&lt;br /&gt;
  {&lt;br /&gt;
    ERROR=2;&lt;br /&gt;
    return ;&lt;br /&gt;
  }&lt;br /&gt;
  delayMicroseconds(80);&lt;br /&gt;
  for(i=0;i&amp;lt;5;i++)&lt;br /&gt;
  {&lt;br /&gt;
    dht_dat[i]=read_dht_dat();&lt;br /&gt;
  }&lt;br /&gt;
  pinMode(DHT_PIN,OUTPUT);&lt;br /&gt;
  digitalWrite(DHT_PIN,HIGH);&lt;br /&gt;
  byte dht_check_sum=dht_dat[0]+dht_dat[1]+dht_dat[2]+dht_dat[3];&lt;br /&gt;
  if(dht_dat[4]!=dht_check_sum)&lt;br /&gt;
  {&lt;br /&gt;
    ERROR=3;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
byte read_dht_dat()  //  read one byte  data &lt;br /&gt;
{&lt;br /&gt;
  byte i=0;&lt;br /&gt;
  byte result=0;&lt;br /&gt;
  for(i=0;i&amp;lt;8;i++)&lt;br /&gt;
  {&lt;br /&gt;
    while(digitalRead(DHT_PIN)==LOW) ;&lt;br /&gt;
    delayMicroseconds(30);&lt;br /&gt;
    if(digitalRead(DHT_PIN)==HIGH)&lt;br /&gt;
    { result|=(1&amp;lt;&amp;lt;(7-i));}&lt;br /&gt;
    while(digitalRead(DHT_PIN)==HIGH);&lt;br /&gt;
  }&lt;br /&gt;
  return result;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
'''程序说明：'''&lt;br /&gt;
*ReadDHT()是初始化DHT11温湿度传感器函数，并读取了包含温湿度信息的5字节数据。该函数有点难理解，大家可以结合原理里面数据传输的格式来理解。&lt;br /&gt;
*read_dht_dat()是实际读取数据的函数，通过50us低电平后高电平点平的时间来判断数据是0还是1。&lt;br /&gt;
== '''调试''' ==&lt;br /&gt;
*步骤一：根据实验原理图连接好实物图。&lt;br /&gt;
[[File:sensor_7.jpg|600px|center|thumb]]&lt;br /&gt;
*步骤二：复制程序到Maple IDE中编译程序。&lt;br /&gt;
*步骤三：下载程序，打开串口监视界面，观察数据。&lt;br /&gt;
*步骤四：在DHT11传感器附近增加湿度和提高温度，观察数据的变化。&lt;br /&gt;
== '''结果''' ==&lt;br /&gt;
串口监视界面显示结果如下图所示。在给DHT11传感器附近加湿、升温后湿度和温度明显增加。&lt;br /&gt;
[[File:sensor_8.jpg|600px|center|thumb]]&lt;br /&gt;
== '''视频''' ==&lt;/div&gt;</summary>
		<author><name>1183296105@qq.com</name></author>	</entry>

	</feed>