<?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=Light_Indicator</id>
		<title>Light Indicator - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Light_Indicator"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Light_Indicator&amp;action=history"/>
		<updated>2026-04-21T07:57:24Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Light_Indicator&amp;diff=9139&amp;oldid=prev</id>
		<title>1304410487@qq.com：/* Objective */</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Light_Indicator&amp;diff=9139&amp;oldid=prev"/>
				<updated>2015-07-31T08:25:53Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Objective&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年7月31日 (五) 08:25的版本&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-l4&quot; &gt;第4行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第4行：&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;==Objective==&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;==Objective==&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;Here we make a simple light indicator, which &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;classify &lt;/del&gt;light value &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in &lt;/del&gt;three &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;levels—green&lt;/del&gt;, blue and red. &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;Here we make a simple light indicator, which &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;divides &lt;/ins&gt;light value &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;into &lt;/ins&gt;three &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;levels, that is, green&lt;/ins&gt;, blue and red.&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;==Principle==&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;==Principle==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>1304410487@qq.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Light_Indicator&amp;diff=9138&amp;oldid=prev</id>
		<title>1304410487@qq.com：Created page with &quot;{{Language|Light Indicator}} {| style=&quot;width: 800px;&quot; |- | ==Objective== Here we make a simple light indicator, which classify light value in three levels—green, blue and re...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Light_Indicator&amp;diff=9138&amp;oldid=prev"/>
				<updated>2015-07-31T07:26:38Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Language|Light Indicator}} {| style=&amp;quot;width: 800px;&amp;quot; |- | ==Objective== Here we make a simple light indicator, which classify light value in three levels—green, blue and re...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Language|Light Indicator}}&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Objective==&lt;br /&gt;
Here we make a simple light indicator, which classify light value in three levels—green, blue and red.  &lt;br /&gt;
&lt;br /&gt;
==Principle==&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Module||Number||Function &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-CoreUSB]]||1||Core board  &lt;br /&gt;
|-&lt;br /&gt;
|S[[Microduino-Sensorhub]]||1||Sensor pinboard &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Light]]||1||light-sensitive sensor &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Colorled]]||1||Colored led light &lt;br /&gt;
|-&lt;br /&gt;
| [[Microduino-BM]]||1||Battery management&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 [[File:light_indicator.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Hardware Buildup==&lt;br /&gt;
*Setup 1：Connect CoreUSB to your PC, open program examples, select the right board (Microduino-CoreUSB) and download program through serial port. &lt;br /&gt;
[https://github.com/Microduino/Microduino_Tutorials/blob/master/MCookie_Tutorial/light_led/light_led.ino light_led]&lt;br /&gt;
*Setup2：Connect the light-sensitive resistor to A0 pin of Sensorhub and the colored LED light to D6 pin.&lt;br /&gt;
[[file:Microduino-sensorhub_rule.JPG|thumb|800px|center]]&lt;br /&gt;
[[file: light_indicator _A0_6.JPG|thumb|800px|center]]&lt;br /&gt;
*Setup5：Stack CoreUSB, Sensorhu and BM. &lt;br /&gt;
[[file: light_indicator_module.JPG|thumb|800px|center]]&lt;br /&gt;
*Setup6：Connect the battery to BM. &lt;br /&gt;
[[file: light_indicator _bm.JPG|thumb|800px|center]]&lt;br /&gt;
&lt;br /&gt;
==Software Debuggin==&lt;br /&gt;
Code description: One part to acquire sensor values and the other part to control LED brightness and color change according the values. &lt;br /&gt;
*Sensor pin description  &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#define PIN 6&lt;br /&gt;
Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIN, NEO_GRB + NEO_KHZ800);&lt;br /&gt;
&lt;br /&gt;
#define Light_PIN A0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*Light intensity pre-set value and the light can be divided into three levels. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#define Light_value1 400&lt;br /&gt;
#define Light_value2 800&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Light detection &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
sensorValue = analogRead(Light_PIN);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The colored LED will adjust color and brightness according to light intensity.  &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
if (sensorValue &amp;lt; Light_value1)&lt;br /&gt;
    colorWipe(strip.Color(0, map(sensorValue, 10, 400, 0, 255), 0));&lt;br /&gt;
  else if (sensorValue &amp;gt;= Light_value1 &amp;amp;&amp;amp; sensorValue &amp;lt; Light_value2)&lt;br /&gt;
    colorWipe(strip.Color(0, 0, map(sensorValue, 400, 800, 0, 255)));&lt;br /&gt;
  else if (Light_value2 &amp;gt;= 800)&lt;br /&gt;
    colorWipe(strip.Color(map(sensorValue, 800, 960, 0, 255), 0, 0));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
Change light intensity from weak to strong, you can see gree, blue and red in order. &lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>1304410487@qq.com</name></author>	</entry>

	</feed>