<?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%B8%89%E8%AF%BE--%E5%88%B6%E4%BD%9C%E6%84%9F%E6%B8%A9%E6%9D%AF%E7%94%B5%E8%B7%AF%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%B8%89%E8%AF%BE--%E5%88%B6%E4%BD%9C%E6%84%9F%E6%B8%A9%E6%9D%AF%E7%94%B5%E8%B7%AF%2Fzh"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E4%B8%89%E8%AF%BE--%E5%88%B6%E4%BD%9C%E6%84%9F%E6%B8%A9%E6%9D%AF%E7%94%B5%E8%B7%AF/zh&amp;action=history"/>
		<updated>2026-06-14T05:56: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%B8%89%E8%AF%BE--%E5%88%B6%E4%BD%9C%E6%84%9F%E6%B8%A9%E6%9D%AF%E7%94%B5%E8%B7%AF/zh&amp;diff=7355&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%B8%89%E8%AF%BE--%E5%88%B6%E4%BD%9C%E6%84%9F%E6%B8%A9%E6%9D%AF%E7%94%B5%E8%B7%AF/zh&amp;diff=7355&amp;oldid=prev"/>
				<updated>2015-01-22T06:39:55Z</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日 (四) 06:39的版本&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-l63&quot; &gt;第63行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第63行：&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;步骤二：复制代码到Maple IDE中编译。&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;步骤二：复制代码到Maple IDE中编译。&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 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;步骤四：改变传感器周围的温度，观察REG LED等的状态。可以通过手握住LM35温度传感器来升温，通过在LM35附近放一装有凉水的凉水杯来降温。&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;步骤四：改变传感器周围的温度，观察REG LED等的状态。可以通过手握住LM35温度传感器来升温，通过在LM35附近放一装有凉水的凉水杯来降温。&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;*首先温度稳定在20度左右，RGB LED灯为绿色。&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;*首先温度稳定在20度左右，RGB LED灯为绿色。&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%B8%89%E8%AF%BE--%E5%88%B6%E4%BD%9C%E6%84%9F%E6%B8%A9%E6%9D%AF%E7%94%B5%E8%B7%AF/zh&amp;diff=7347&amp;oldid=prev</id>
		<title>1183296105@qq.com：Created page with &quot;== 目的 == 为了加深对LM35温度传感器以及AD采样的的理解，本课结合LM35做个模拟的感温杯。 == 设备 == *Microduino-CoreSTM32/zh  Microduino-C...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E4%B8%89%E8%AF%BE--%E5%88%B6%E4%BD%9C%E6%84%9F%E6%B8%A9%E6%9D%AF%E7%94%B5%E8%B7%AF/zh&amp;diff=7347&amp;oldid=prev"/>
				<updated>2015-01-22T06:30:08Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== 目的 == 为了加深对LM35温度传感器以及AD采样的的理解，本课结合LM35做个模拟的感温杯。 == 设备 == *&lt;a href=&quot;/index.php/Microduino-CoreSTM32/zh&quot; title=&quot;Microduino-CoreSTM32/zh&quot;&gt;Microduino-CoreSTM32/zh&lt;/a&gt;  Microduino-C...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== 目的 ==&lt;br /&gt;
为了加深对LM35温度传感器以及AD采样的的理解，本课结合LM35做个模拟的感温杯。&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;
:*LM35D温度传感器 一个&lt;br /&gt;
:*RGB led灯       一个&lt;br /&gt;
:*470欧电阻	  一个&lt;br /&gt;
[[File:lesson13_1.jpg|600px|center|thumb]]&lt;br /&gt;
== 原理图 ==&lt;br /&gt;
RGB LED灯能够显示红绿蓝三种颜色，有共阳极和共阴极之分，本课采用的是共阳极的RGB LED灯，也就是下图所示的公共端接正极，其它三个引脚接负极。&lt;br /&gt;
[[File:lesson13_2.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
下图为本课的原理图，LM35接法不变，RGB LED灯的公共端通过电阻接到[[Microduino-CoreSTM32/zh]]的Vcc引脚，绿、蓝、红引脚分别接在[[Microduino-CoreSTM32/zh]]的D2、D3、D4引脚。&lt;br /&gt;
[[File:lesson13_3.jpg|600px|center|thumb]]&lt;br /&gt;
== 程序 ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int A0=14;   //temperature sensor connected to pin 14&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  pinMode(A0,INPUT_ANALOG); //set up pin for ananlog input&lt;br /&gt;
  pinMode(2,OUTPUT);  //green light pin&lt;br /&gt;
  pinMode(3,OUTPUT);  //blue light pin&lt;br /&gt;
  pinMode(4,OUTPUT);  //red light pin&lt;br /&gt;
  SerialUSB.begin();        &lt;br /&gt;
} &lt;br /&gt;
void loop() &lt;br /&gt;
{&lt;br /&gt;
  int n= analogRead(A0);   // read the input pin&lt;br /&gt;
  float  temperature = n * (5.0/4096.0*100);  //convert ADC reading (12 bits) to temperature&lt;br /&gt;
  if(temperature&amp;lt;21)     // Low temperature zone&lt;br /&gt;
  {&lt;br /&gt;
    digitalWrite(2,LOW);   //green light is on&lt;br /&gt;
    digitalWrite(3,HIGH);&lt;br /&gt;
    digitalWrite(4,HIGH);&lt;br /&gt;
  }&lt;br /&gt;
  else if((temperature&amp;gt;=21)&amp;amp;&amp;amp;(temperature&amp;lt;=23))  //medium temperature zone&lt;br /&gt;
  {&lt;br /&gt;
    digitalWrite(2,HIGH);&lt;br /&gt;
    digitalWrite(3,LOW); //blue light is on&lt;br /&gt;
    digitalWrite(4,HIGH);&lt;br /&gt;
  }&lt;br /&gt;
  else if(temperature&amp;gt;23)//High temperature zone&lt;br /&gt;
  {&lt;br /&gt;
    digitalWrite(2,HIGH);&lt;br /&gt;
    digitalWrite(3,HIGH);&lt;br /&gt;
    digitalWrite(4,LOW);//red light is on&lt;br /&gt;
  }&lt;br /&gt;
  SerialUSB.println( temperature);    // print the temperature value         &lt;br /&gt;
  delay(1000);                   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
温度设置了低温，中温，高温三个区，指示灯分别是绿、蓝、红。&lt;br /&gt;
== 调试 ==&lt;br /&gt;
步骤一：按照实验原理图连接好电路图。&lt;br /&gt;
&lt;br /&gt;
[[File:lesson13_4.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
步骤二：复制代码到Maple IDE中编译。&lt;br /&gt;
步骤三：下载程序代码。&lt;br /&gt;
步骤四：改变传感器周围的温度，观察REG LED等的状态。可以通过手握住LM35温度传感器来升温，通过在LM35附近放一装有凉水的凉水杯来降温。&lt;br /&gt;
== 结果 ==&lt;br /&gt;
*首先温度稳定在20度左右，RGB LED灯为绿色。&lt;br /&gt;
*用手握住LM35传感器后，RGB LED灯不断有绿色变为蓝色，然后由蓝色转为红色，最后最后稳定在红色。&lt;br /&gt;
*松开手，REG LED等慢慢由红色变为蓝色，然后由蓝色变为绿色，最后稳定在绿色。&lt;br /&gt;
[[File:lesson13_5.jpg|600px|center|thumb]]&lt;br /&gt;
[[File:lesson13_6.jpg|600px|center|thumb]]&lt;br /&gt;
[[File:lesson13_7.jpg|600px|center|thumb]]&lt;br /&gt;
== 视频 ==&lt;/div&gt;</summary>
		<author><name>1183296105@qq.com</name></author>	</entry>

	</feed>