<?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%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%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%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%E5%99%A8%2Fzh"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%E5%99%A8/zh&amp;action=history"/>
		<updated>2026-04-21T09:52:23Z</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%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%E5%99%A8/zh&amp;diff=5608&amp;oldid=prev</id>
		<title>2014年11月5日 (三) 07:20 Radiumray9@gmail.com</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%E5%99%A8/zh&amp;diff=5608&amp;oldid=prev"/>
				<updated>2014-11-05T07:20:04Z</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;2014年11月5日 (三) 07:20的版本&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-l1&quot; &gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&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;{{Language|Maple Lesson 10 - Light indicator&amp;quot;}}&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;{| style=&amp;quot;width: 800px;&amp;quot;&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;{| style=&amp;quot;width: 800px;&amp;quot;&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>Radiumray9@gmail.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%E5%99%A8/zh&amp;diff=3726&amp;oldid=prev</id>
		<title>2014年8月17日 (日) 06:30 Jasonsheng</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%E5%99%A8/zh&amp;diff=3726&amp;oldid=prev"/>
				<updated>2014-08-17T06:30:41Z</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;2014年8月17日 (日) 06:30的版本&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-l1&quot; &gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Language|Lesson_12--Microduino_&amp;quot;Light_indicator&amp;quot; }}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&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;{| style=&amp;quot;width: 800px;&amp;quot;&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;{| style=&amp;quot;width: 800px;&amp;quot;&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>Jasonsheng</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%E5%99%A8/zh&amp;diff=3394&amp;oldid=prev</id>
		<title>2014年7月22日 (二) 15:21 Pkj</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%E5%99%A8/zh&amp;diff=3394&amp;oldid=prev"/>
				<updated>2014-07-22T15:21:53Z</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;2014年7月22日 (二) 15:21的版本&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-l76&quot; &gt;第76行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第76行：&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;当光照很弱，低于设置的最小值时，所有灯都灭。随着光的增加，每到一个设定的级别就点亮一个LED，达到指示的效果。实际上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;当光照很弱，低于设置的最小值时，所有灯都灭。随着光的增加，每到一个设定的级别就点亮一个LED，达到指示的效果。实际上LED灯一直在闪烁，因为为了使光强不在某一等级，要熄灭此等级的灯，就直接在点亮之后立即熄灭，在执行过程中没加延时，只要还在该等级，就循环处理，所以看起来就好像一直亮着。&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;[[File:stm32-lesson11Result.jpg|600px|center|thumb]]&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;−&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[File:stm32-lesson11Result.jpg|600px|center|thumb]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Pkj</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%E5%99%A8/zh&amp;diff=3393&amp;oldid=prev</id>
		<title>2014年7月22日 (二) 15:21 Pkj</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%E5%99%A8/zh&amp;diff=3393&amp;oldid=prev"/>
				<updated>2014-07-22T15:21:24Z</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;2014年7月22日 (二) 15:21的版本&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-l78&quot; &gt;第78行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第78行：&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;/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;−&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:lesson11Result.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;stm32-&lt;/ins&gt;lesson11Result.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Pkj</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%E5%99%A8/zh&amp;diff=3392&amp;oldid=prev</id>
		<title>Pkj：Created page with &quot;{{Language|Lesson_12--Microduino_&quot;Light_indicator&quot; }} {| style=&quot;width: 800px;&quot; |- | ==目的== 上节课讲到了光敏电阻实验，只把光线分为两个等级，强或...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E5%8D%81%E8%AF%BE--%E5%85%89%E7%85%A7%E6%8C%87%E7%A4%BA%E5%99%A8/zh&amp;diff=3392&amp;oldid=prev"/>
				<updated>2014-07-22T15:20:58Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Language|Lesson_12--Microduino_&amp;quot;Light_indicator&amp;quot; }} {| style=&amp;quot;width: 800px;&amp;quot; |- | ==目的== 上节课讲到了光敏电阻实验，只把光线分为两个等级，强或...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Language|Lesson_12--Microduino_&amp;quot;Light_indicator&amp;quot; }}&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==目的==&lt;br /&gt;
上节课讲到了光敏电阻实验，只把光线分为两个等级，强或弱，今天深入一下，做个光照指示器，用4个LED等指示，把光强分为5个等级，光敏电阻感受到的光越强,就点亮越多的LED来达到指示的目的。&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;
**光敏电阻           一个  &lt;br /&gt;
**220欧             四个&lt;br /&gt;
**10K               一个&lt;br /&gt;
**led发光二级管     四个&lt;br /&gt;
**USB数据连接线    一根&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:stm32-lesson11All.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==原理图==&lt;br /&gt;
[[File:stm32-lesson11-Principle.jpg|600px|center|thumb]]&lt;br /&gt;
&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;
const int analogInPin = 14;&lt;br /&gt;
const int ledPin = 4;&lt;br /&gt;
&lt;br /&gt;
float sensorValue = 0;        // value read from the pot&lt;br /&gt;
&lt;br /&gt;
int xl=4000; //此处需是环境基础亮度变量，请查看自己的亮度数值，填写到此处数值要略大于所测得的数据但小于灯光下的数据&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  pinMode(analogInPin, INPUT);&lt;br /&gt;
  for(int i=3; i&amp;lt;=6;i++)          //使用循环方式创建2-5号数字口为输出模式&lt;br /&gt;
  {&lt;br /&gt;
    pinMode(i,OUTPUT);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  // read the analog in value:&lt;br /&gt;
  sensorValue = analogRead(analogInPin);&lt;br /&gt;
  &lt;br /&gt;
if (sensorValue&amp;gt;=1000)             //各个颜色层级判断，各个层级数值，大家可根据自己的使用环境进行相应调整，最小0，最大1023&lt;br /&gt;
  {&lt;br /&gt;
    digitalWrite(3,HIGH);&lt;br /&gt;
    digitalWrite(3,LOW);//当不再这个等级下，灯会熄灭&lt;br /&gt;
  }&lt;br /&gt;
  if(sensorValue&amp;gt;1500)&lt;br /&gt;
   {&lt;br /&gt;
    digitalWrite(4,HIGH);&lt;br /&gt;
    digitalWrite(4,LOW);&lt;br /&gt;
  }&lt;br /&gt;
    if(sensorValue&amp;gt;2000)&lt;br /&gt;
   {&lt;br /&gt;
     digitalWrite(5,HIGH);&lt;br /&gt;
     digitalWrite(5,LOW);&lt;br /&gt;
  }&lt;br /&gt;
    if(sensorValue&amp;gt;2500)&lt;br /&gt;
   {&lt;br /&gt;
     digitalWrite(6,HIGH);&lt;br /&gt;
     digitalWrite(6,LOW);&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  SerialUSB.print(&amp;quot;sensorValue = &amp;quot;);&lt;br /&gt;
  SerialUSB.println(sensorValue);&lt;br /&gt;
  delay(500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==结果==&lt;br /&gt;
当光照很弱，低于设置的最小值时，所有灯都灭。随着光的增加，每到一个设定的级别就点亮一个LED，达到指示的效果。实际上LED灯一直在闪烁，因为为了使光强不在某一等级，要熄灭此等级的灯，就直接在点亮之后立即熄灭，在执行过程中没加延时，只要还在该等级，就循环处理，所以看起来就好像一直亮着。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[File:lesson11Result.jpg|600px|center|thumb]]&lt;/div&gt;</summary>
		<author><name>Pkj</name></author>	</entry>

	</feed>