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

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Lighten_Led&amp;diff=2797&amp;oldid=prev</id>
		<title>Pkj：Created page with &quot;{{Language | 点亮led灯}} {| style=&quot;width: 800px;&quot; |- | ==Objective== This tutorial will teach you how to use the Processing to light LED.  ==Equipment== *'''Microduino-Co...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Lighten_Led&amp;diff=2797&amp;oldid=prev"/>
				<updated>2014-05-27T07:59:08Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Language | 点亮led灯}} {| style=&amp;quot;width: 800px;&amp;quot; |- | ==Objective== This tutorial will teach you how to use the Processing to light LED.  ==Equipment== *&amp;#039;&amp;#039;&amp;#039;Microduino-Co...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Language | 点亮led灯}}&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Objective==&lt;br /&gt;
This tutorial will teach you how to use the Processing to light LED.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
*'''[[Microduino-FT232R]]'''&lt;br /&gt;
&lt;br /&gt;
*Other equipment&lt;br /&gt;
**USB cable           one  &lt;br /&gt;
**LED                 one&lt;br /&gt;
**330Ω resistor       one&lt;br /&gt;
**Bread               one&lt;br /&gt;
**Breadboard Jumper   onebox&lt;br /&gt;
&lt;br /&gt;
==Schematic==&lt;br /&gt;
&lt;br /&gt;
[[File:processingControlLED原理图.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
&lt;br /&gt;
https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Processing/LEDButtonByOver&lt;br /&gt;
&lt;br /&gt;
https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Processing/LEDButtonByClick&lt;br /&gt;
&lt;br /&gt;
Note：Don't drop the picture in program&lt;br /&gt;
&lt;br /&gt;
==Debut==&lt;br /&gt;
&lt;br /&gt;
Step 1：Set up hardware system, as follows:&lt;br /&gt;
[[File:processingControlLED连接图.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
Step 2：Explain the code:&lt;br /&gt;
&lt;br /&gt;
// Declaring two variable of type PImage, a class available to us from the Processing core library.&lt;br /&gt;
PImage LEDON, LEDOFF; &lt;br /&gt;
&lt;br /&gt;
//load two img&lt;br /&gt;
LEDON = loadImage(&amp;quot;LEDON.png&amp;quot;);&lt;br /&gt;
LEDOFF = loadImage(&amp;quot;LEDOFF.png&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Mouse movement will light the LED which was realized in LEDButtonByOver.&lt;br /&gt;
&lt;br /&gt;
Mouse over:&lt;br /&gt;
&lt;br /&gt;
  // When the mouse is moved, the state of the button is toggled. &lt;br /&gt;
  void mouseMoved() {&lt;br /&gt;
    if (mouseX &amp;gt; x &amp;amp;&amp;amp; mouseX &amp;lt; x+w &amp;amp;&amp;amp; mouseY &amp;gt; y &amp;amp;&amp;amp; mouseY &amp;lt; y+h) {&lt;br /&gt;
      button = true;&lt;br /&gt;
    }  &lt;br /&gt;
    else {&lt;br /&gt;
      button = false;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Mouse click will light the LED which was realized in LEDButtonByClick.&lt;br /&gt;
&lt;br /&gt;
Mouse Click:&lt;br /&gt;
&lt;br /&gt;
  // When the mouse is pressed, the state of the button is toggled.   &lt;br /&gt;
  void mousePressed() {&lt;br /&gt;
    if (mouseX &amp;gt; x &amp;amp;&amp;amp; mouseX &amp;lt; x+w &amp;amp;&amp;amp; mouseY &amp;gt; y &amp;amp;&amp;amp; mouseY &amp;lt; y+h) {&lt;br /&gt;
      button = !button;&lt;br /&gt;
    }  &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Step 3：Compile the code and download it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 4：After run, mouse move or click the LED, observe the result.&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
Mouse move on the LED, it will light, and trun off when leave it. Processing'S animation effects:&lt;br /&gt;
&lt;br /&gt;
[[File:processingOverLEDON.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
[[File:processingOverLEDOFF.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pkj</name></author>	</entry>

	</feed>