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

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Microduino_Butterfly_Light&amp;diff=7731&amp;oldid=prev</id>
		<title>1304410487@qq.com：/* Program Download */</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_Butterfly_Light&amp;diff=7731&amp;oldid=prev"/>
				<updated>2015-02-06T07:01:39Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Program Download&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年2月6日 (五) 07:01的版本&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-l153&quot; &gt;第153行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第153行：&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;===Program Download===&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;===Program Download===&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;*Make sure you build Microduino IDE, or you can refer to: &amp;#160;&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;*Make sure you build Microduino IDE, or you can refer to:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[Microduino Getting start]].&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;*Make there is _99_LCD_NeoPixel library in IDE.&amp;#160; &amp;#160;&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;*Make there is _99_LCD_NeoPixel library in IDE.&amp;#160; &amp;#160;&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;*Open the downloaded program and select the right board to download after compiling. &amp;#160;&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;*Open the downloaded program and select the right board to download after compiling. &amp;#160;&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;*After the download, you can test whether the function mentioned above is right or not by the Touch sensor. Meantime, you need to notice which LED light the Touch sensor corresponds to. &amp;#160;&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;*After the download, you can test whether the function mentioned above is right or not by the Touch sensor. Meantime, you need to notice which LED light the Touch sensor corresponds to.&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;==Overall Assembling==&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;==Overall Assembling==&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=Microduino_Butterfly_Light&amp;diff=7730&amp;oldid=prev</id>
		<title>1304410487@qq.com：Created page with &quot;{| style=&quot;width: 800px;&quot; |- | ==Outline== *Project： Butterfly light *Purpose： Butterfly light is a touch control color-changing music light. *Difficulty: Middle-level   *T...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_Butterfly_Light&amp;diff=7730&amp;oldid=prev"/>
				<updated>2015-02-06T06:58:21Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| style=&amp;quot;width: 800px;&amp;quot; |- | ==Outline== *Project： Butterfly light *Purpose： Butterfly light is a touch control color-changing music light. *Difficulty: Middle-level   *T...&amp;quot;&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;
==Outline==&lt;br /&gt;
*Project： Butterfly light&lt;br /&gt;
*Purpose： Butterfly light is a touch control color-changing music light.&lt;br /&gt;
*Difficulty: Middle-level  &lt;br /&gt;
*Time-consuming: 6-Hour &lt;br /&gt;
*Maker: Guysgogo&amp;amp;&amp;amp;Microduino&lt;br /&gt;
==Team Introduction==&lt;br /&gt;
[[File:setup_gusgogo_logo.jpg|80px|right|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Guysgogo is team composed of four senior students in the maker class of LKK Intelligent Hardware Industrial Design. Three of the students—Run Jiang, Huiyu Hao, Tingyu Li and Chaohui Xie, are college students from Hebei.   &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
==Bill of Material==&lt;br /&gt;
*Microduino 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-Core+]]||1||Core board&lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-USBTTL ]]||1||Program download &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Audio]] ||1||Audio control &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Amplifier]] ||1||Amplifier module  &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Sensorhub]] ||1||Sensor connection board &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Cube-S1]] ||1||Base board  &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Lantern]] ||7||Colorful LED light &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Touch]] ||7||Touch sensor &lt;br /&gt;
|}&lt;br /&gt;
*Other Equipment &lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Equipment||Number||Function &lt;br /&gt;
|-&lt;br /&gt;
|Loudspeaker||1||&lt;br /&gt;
|-&lt;br /&gt;
|MicroUSB cable||1||Power supply &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Document==&lt;br /&gt;
Program download:&lt;br /&gt;
[https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Advanced_Tutorial/Butterfly_light Butterfly_light]&lt;br /&gt;
&lt;br /&gt;
3D model download: '''[[File:3D-Butterfly light.zip]]'''&lt;br /&gt;
&lt;br /&gt;
==Build 3D Model==&lt;br /&gt;
The model adopts buttery shape.  &lt;br /&gt;
[[File:3dm_light1.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Build Hardware Circuit==&lt;br /&gt;
*The colorful LED light adopts built-in IC control chip. With one-wire bus control, you only need one I/O port to control. Just connect the OUT interface of one Lantern to the IN interface of the other Lantern, and then join up the IN interface to Microduino core board via Sensorhub.   &lt;br /&gt;
&lt;br /&gt;
[[File:light_steup.jpg|600px|center|thumb]]&lt;br /&gt;
*Each touch sensor needs a Microduino I/O port to drive. We can tell if it is pressed by reading sensor values via digital port and analog port.  &lt;br /&gt;
[[File:Touch_steup.jpg|600px|center|thumb]]&lt;br /&gt;
*You can debug software after building the hardware circuit.  &lt;br /&gt;
&lt;br /&gt;
==Prepare Audio==&lt;br /&gt;
*Download audio file：'''[[File:Music-Butterfly light.zip]]'''&lt;br /&gt;
*Connect Microduino-Audio module with your computer via USB cable.  It will show a disk named “microduino” after successful connection. Just open the disk and select audio file, then write to flash.  &lt;br /&gt;
&lt;br /&gt;
==Software Debugging==&lt;br /&gt;
===Program Description===&lt;br /&gt;
*“audio.h”file is used for music play control and “key.h” file is for touch detection.  &lt;br /&gt;
**Audio module is connected to Serial 1 to control by default.  &lt;br /&gt;
**As for touch sensor pin definition, users can change according to personal needs:  &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
  int sensor_pin[7]=&lt;br /&gt;
{&lt;br /&gt;
  4,8,10,12,A0,A2,A6&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**The colored LED light defines seven lights, whose light control pin is D6:  &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(7, PIN, NEO_GRB + NEO_KHZ800);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*How to judge the touch of seven lights &amp;amp; how to control music and LED lights:  &lt;br /&gt;
**When pressing some a button, it will play music and the white led light will blink. &lt;br /&gt;
**When pressing twice one time, the white led will go on.  &lt;br /&gt;
**When pressing three times once, you can change the light color.  &lt;br /&gt;
**Anytime, one press means turning off the light.  &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
  for(int a=0;a&amp;lt;7;a++)&lt;br /&gt;
  {&lt;br /&gt;
    {&lt;br /&gt;
      if(key_get(sensor_pin[a],1))		//When triggered,  &lt;br /&gt;
      {&lt;br /&gt;
        //colorWipe(strip.Color(255, 255, 0), 10);&lt;br /&gt;
        sensor_vol_cache[a]++;	//Counting&lt;br /&gt;
        // Serial.print(&amp;quot;+&amp;quot;);&lt;br /&gt;
        if(sensor_vol_cache[a]&amp;gt;3)&lt;br /&gt;
          sensor_vol_cache[a]=3;&lt;br /&gt;
&lt;br /&gt;
        {&lt;br /&gt;
          colorWipe(color[8], a);&lt;br /&gt;
&lt;br /&gt;
          num=a;&lt;br /&gt;
&lt;br /&gt;
          audio_choose(a+1);&lt;br /&gt;
          audio_play();&lt;br /&gt;
&lt;br /&gt;
          colorWipe(color[0], a);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        time1[a]=millis();&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      if(millis()-time1[a]&amp;gt;500 &amp;amp;&amp;amp; sensor_vol_cache[a]!=0)	//Just start it and delay for one second or more, and the scan is ended. &lt;br /&gt;
      {&lt;br /&gt;
        if(sensor_vol_cache[a]==1)&lt;br /&gt;
        {&lt;br /&gt;
          colorWipe(color[0], a);&lt;br /&gt;
          Serial.println(&amp;quot;LED_OFF&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        else if(sensor_vol_cache[a]==2)&lt;br /&gt;
        {&lt;br /&gt;
          colorWipe(color[8], a);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
          randomSeed(millis()%1000);&lt;br /&gt;
          sensor_vol[a]=random(1,7);&lt;br /&gt;
          Serial.println(&amp;quot;&amp;quot;);&lt;br /&gt;
          Serial.print(&amp;quot;num:&amp;quot;);&lt;br /&gt;
          Serial.print(a);&lt;br /&gt;
          Serial.print(&amp;quot;:&amp;quot;);&lt;br /&gt;
          Serial.print(sensor_vol[a]);&lt;br /&gt;
&lt;br /&gt;
          colorWipe(color[sensor_vol[a]], a);&lt;br /&gt;
        }&lt;br /&gt;
        sensor_vol_cache[a]=0;		//Return to zero and wait for the next scan.&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Program Download===&lt;br /&gt;
*Make sure you build Microduino IDE, or you can refer to: &lt;br /&gt;
*Make there is _99_LCD_NeoPixel library in IDE.  &lt;br /&gt;
*Open the downloaded program and select the right board to download after compiling. &lt;br /&gt;
*After the download, you can test whether the function mentioned above is right or not by the Touch sensor. Meantime, you need to notice which LED light the Touch sensor corresponds to. &lt;br /&gt;
&lt;br /&gt;
==Overall Assembling==&lt;br /&gt;
*Fixate the light and the touch sensor on the outside of the 3D battery. &lt;br /&gt;
[[File:setup_3d_light1.jpg|600px|center|thumb]]&lt;br /&gt;
[[File:setup_3d_light2.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
*Wrap the battery with a beautiful exterior. &lt;br /&gt;
[[File:setup_3d_page.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
*Fixate the loudspeaker on the base and then get it fixated with the battery.  &lt;br /&gt;
[[File:setup_3d_buzzer.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
*Plug in USB cable for power supply at last and have fun!  &lt;br /&gt;
[[File:setup_3d_ok1.jpg|600px|center|thumb]]&lt;br /&gt;
[[File:setup_3d_ok2.jpg|600px|center|thumb]]&lt;br /&gt;
==Notice==&lt;br /&gt;
*Since Audio adopts Serial 1 by default, please initialize Serial 1: “AUDIO_PORT.begin(9600);”&lt;br /&gt;
*Please make sure the touch sensor corresponding with the lights.  &lt;br /&gt;
==Video==&lt;br /&gt;
http://v.youku.com/v_show/id_XODc2NDMzODg4.html&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>1304410487@qq.com</name></author>	</entry>

	</feed>