<?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=%E8%8E%B7%E5%8F%96%E5%BD%A9%E7%81%AF%E8%AE%BE%E7%BD%AE%E4%BF%A1%E6%81%AF</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=%E8%8E%B7%E5%8F%96%E5%BD%A9%E7%81%AF%E8%AE%BE%E7%BD%AE%E4%BF%A1%E6%81%AF"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E8%8E%B7%E5%8F%96%E5%BD%A9%E7%81%AF%E8%AE%BE%E7%BD%AE%E4%BF%A1%E6%81%AF&amp;action=history"/>
		<updated>2026-06-13T12:49:50Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E8%8E%B7%E5%8F%96%E5%BD%A9%E7%81%AF%E8%AE%BE%E7%BD%AE%E4%BF%A1%E6%81%AF&amp;diff=21245&amp;oldid=prev</id>
		<title>2017年7月7日 (五) 05:37 1196357542</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E8%8E%B7%E5%8F%96%E5%BD%A9%E7%81%AF%E8%AE%BE%E7%BD%AE%E4%BF%A1%E6%81%AF&amp;diff=21245&amp;oldid=prev"/>
				<updated>2017-07-07T05:37:21Z</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;2017年7月7日 (五) 05: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-l70&quot; &gt;第70行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第70行：&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;[[Sensor-Color_LED_Reference|返回Sensor-ColorLED_Reference界面]]&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;[[Sensor-Color_LED_Reference|返回Sensor-ColorLED_Reference界面]]&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 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;[[Sensor-Color_LED/zh | 返回Sensor-Color_LED界面]]&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;/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;|}&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>1196357542</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E8%8E%B7%E5%8F%96%E5%BD%A9%E7%81%AF%E8%AE%BE%E7%BD%AE%E4%BF%A1%E6%81%AF&amp;diff=21207&amp;oldid=prev</id>
		<title>1196357542：创建页面，内容为“{| style=&quot;width: 800px;&quot; |- | &lt;br&gt; &lt;big&gt;此示例给出了获取控制彩灯相关的几个参数的方法。&lt;/big&gt; &lt;br&gt; &lt;br&gt; &lt;p style=&quot;color: #E87E05;font-size:135%...”</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E8%8E%B7%E5%8F%96%E5%BD%A9%E7%81%AF%E8%AE%BE%E7%BD%AE%E4%BF%A1%E6%81%AF&amp;diff=21207&amp;oldid=prev"/>
				<updated>2017-07-06T11:23:08Z</updated>
		
		<summary type="html">&lt;p&gt;创建页面，内容为“{| style=&amp;quot;width: 800px;&amp;quot; |- | &amp;lt;br&amp;gt; &amp;lt;big&amp;gt;此示例给出了获取控制彩灯相关的几个参数的方法。&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; &amp;lt;p style=&amp;quot;color: #E87E05;font-size:135%...”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;此示例给出了获取控制彩灯相关的几个参数的方法。&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;color: #E87E05;font-size:135%&amp;quot;&amp;gt;硬件清单&amp;lt;/p&amp;gt;&lt;br /&gt;
*[[mCookie-Battery]]&lt;br /&gt;
*[[mCookie-Core]]&lt;br /&gt;
*[[mCookie-Hub/zh|mCookie-Hub]]&lt;br /&gt;
*[[Sensor-Color_LED/zh]]&lt;br /&gt;
[[File:Sensor_ColorLED_setPixelsColor.jpg|600px|left]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;color: #E87E05;font-size:135%&amp;quot;&amp;gt;电路搭建&amp;lt;/p&amp;gt;&lt;br /&gt;
将彩灯的&amp;lt;big&amp;gt;IN&amp;lt;/big&amp;gt;接到Hub的6/7引脚，实际使用的是6号引脚。&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
将Battery、Core、Hub堆叠在一起，通过MicroUSB数据线接入电脑。&lt;br /&gt;
[[File:.jpg|600px|left]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;color: #E87E05;font-size:135%&amp;quot;&amp;gt;代码&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;Microduino_ColorLED.h&amp;gt; //引用彩灯库&lt;br /&gt;
&lt;br /&gt;
#define LED_NUM 7                 //定义彩灯数量&lt;br /&gt;
#define PIN_LED 6                 //定义彩灯端口号&lt;br /&gt;
ColorLED strip = ColorLED(LED_NUM, PIN_LED);  //定义彩灯数量、彩灯引脚号，色彩编码格式缺省配置（默认为：NEO_GRB + NEO_KHZ800）&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(115200);    //串口初始化&lt;br /&gt;
  &lt;br /&gt;
  strip.begin();            //彩灯初始化&lt;br /&gt;
  strip.setBrightness(255); //设置彩灯亮度&lt;br /&gt;
  strip.show();             //将彩灯点亮成设置的颜色&lt;br /&gt;
&lt;br /&gt;
  strip.setPixelColor(0, COLOR_GREEN); //设置第0号灯为绿色&lt;br /&gt;
  strip.show();             //将彩灯点亮成设置的颜色&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  uint8_t a=strip.numPixels();    //将获取到的已设置的彩灯级联数量值赋给a&lt;br /&gt;
  Serial.print(&amp;quot;numPixels: &amp;quot;); &lt;br /&gt;
  Serial.print(a);               //串口打印a的值&lt;br /&gt;
&lt;br /&gt;
  int8_t b=strip.getPin();        //将获取到的彩灯引脚号的值赋给b&lt;br /&gt;
  Serial.print(&amp;quot;   Pin: &amp;quot;); &lt;br /&gt;
  Serial.print(b);               //串口打印b的值&lt;br /&gt;
&lt;br /&gt;
  uint8_t c=strip.getBrightness(); //将获取到的彩灯亮度值赋给c&lt;br /&gt;
  Serial.print(&amp;quot;   Brightness: &amp;quot;); &lt;br /&gt;
  Serial.print(c);                 //串口打印c的值&lt;br /&gt;
  &lt;br /&gt;
  uint32_t d=strip.getPixelColor(0);  //将获取到的第0号彩灯色彩值赋给d，设置的亮度不同，获取到的值也会不同&lt;br /&gt;
  Serial.print(&amp;quot;   PixelColor(0): &amp;quot;);   &lt;br /&gt;
  Serial.println(d,HEX);             //串口打印d的16进制值&lt;br /&gt;
  &lt;br /&gt;
  delay(100);                         //延时100ms&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;color: #E87E05;font-size:135%&amp;quot;&amp;gt;相关案例&amp;lt;/p&amp;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;
[[Sensor-Color_LED_Reference|返回Sensor-ColorLED_Reference界面]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>1196357542</name></author>	</entry>

	</feed>