<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>umkk.eu &#187; Light-emitting diode</title>
	<atom:link href="http://umkk.eu/tag/light-emitting-diode/feed/" rel="self" type="application/rss+xml" />
	<link>http://umkk.eu</link>
	<description>you can also go there !</description>
	<lastBuildDate>Fri, 25 Jun 2010 16:00:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mood light</title>
		<link>http://umkk.eu/mood-light/01/</link>
		<comments>http://umkk.eu/mood-light/01/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 18:46:47 +0000</pubDate>
		<dc:creator>sergiu</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[leds]]></category>
		<category><![CDATA[Light-emitting diode]]></category>
		<category><![CDATA[Lighting]]></category>
		<category><![CDATA[mood light]]></category>
		<category><![CDATA[RGB color model]]></category>
		<category><![CDATA[tricolor]]></category>

		<guid isPermaLink="false">http://umkk.eu/?p=268</guid>
		<description><![CDATA[I wanted to build this for o long time... and today I finally had the "mood" and the time to do it... it's a mood light created with a tricolor led and a laptop with a parallel port.
I did this to see what is required to create a mood light, because the plan is to [...]


Related posts:<ol><li><a href='http://umkk.eu/stepper-motor-inteligent-driver-and-controller/10/' rel='bookmark' title='Permanent Link: Stepper motor inteligent driver and controller'>Stepper motor inteligent driver and controller</a></li>
<li><a href='http://umkk.eu/stepper-motor-controller/01/' rel='bookmark' title='Permanent Link: Stepper motor controller'>Stepper motor controller</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I wanted to build this for o long time... and today I finally had the "mood" and the time to do it... it's a mood light created with a tricolor led and a laptop with a parallel port.<br />
I did this to see what is required to create a mood light, because the plan is to create one with a pic microcontroller and use it as a digital candle.<br />
Here is the youtube movie with it :<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/vKtDyY8Z22o&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/vKtDyY8Z22o&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>As you can see I created a paper cube and inserted the led into it to have a diffuse light, or else the 3 basic colors  will appear as 3 red circles, and we don't want that.</p>
<p>Here are some pictures too :</p>
<div id="attachment_275" class="wp-caption aligncenter" style="width: 310px"><a href="http://umkk.eu/wp-content/uploads/2010/01/IMG_6466.jpg"><img class="size-medium wp-image-275" title="IMG_6466" src="http://umkk.eu/wp-content/uploads/2010/01/IMG_6466-300x199.jpg" alt="Mood light" width="300" height="199" /></a><p class="wp-caption-text">Mood light</p></div>
<div id="attachment_276" class="wp-caption aligncenter" style="width: 310px"><a href="http://umkk.eu/wp-content/uploads/2010/01/IMG_6467.jpg"><img class="size-medium wp-image-276" title="mood ligt cube" src="http://umkk.eu/wp-content/uploads/2010/01/IMG_6467-300x199.jpg" alt="the paper cube inside which the led is inserted" width="300" height="199" /></a><p class="wp-caption-text">the paper cube inside which the led is inserted</p></div>
<div id="attachment_277" class="wp-caption aligncenter" style="width: 310px"><a href="http://umkk.eu/wp-content/uploads/2010/01/IMG_6469.jpg"><img class="size-medium wp-image-277" title="IMG_6469" src="http://umkk.eu/wp-content/uploads/2010/01/IMG_6469-300x199.jpg" alt="the rgb led" width="300" height="199" /></a><p class="wp-caption-text">the rgb led</p></div>
<p>And if you are interested in building the paper cube here is the plan (print on an A4 sheet of paper) :</p>
<div id="attachment_279" class="wp-caption aligncenter" style="width: 222px"><a href="http://umkk.eu/wp-content/uploads/2010/01/cuba4.jpg"><img class="size-medium wp-image-279" title="paper_cube" src="http://umkk.eu/wp-content/uploads/2010/01/cuba4-212x300.jpg" alt="Paper cube" width="212" height="300" /></a><p class="wp-caption-text">Paper cube</p></div>
<p><strong>If you are interested here is some theory :</strong></p>
<p>Each color is build using 3 base colors : red, green and blue, the led has 4 pins, a comon one and one for each color, so you can individualy turn on and off each color, so we will use 4 pins from the paralel port.</p>
<p>In my program (which is not yet optimized) each component (rgb) can have a value between 0 and 255, to do this we have a huge while cycle where we show the colors, here is a diagram to make it easier.</p>
<p style="text-align: center;">
<div class="wp-caption aligncenter" style="width: 410px"><a href="http://content.screencast.com/users/rsergiu2003/folders/Jing/media/13f62357-4b4a-43ca-be6b-2008dd6426cc/2010-01-02_2038.png"><img title="Diagram" src="http://content.screencast.com/users/rsergiu2003/folders/Jing/media/13f62357-4b4a-43ca-be6b-2008dd6426cc/2010-01-02_2038.png" alt="Diagram" width="400" height="300" /></a><p class="wp-caption-text">Diagram</p></div>
<p>So from diagram is pretty clear, based on each color value we show that color an amount of time, as bigger the value, more the time and brighter the color, a resolution of 255 values for each color is more then enough for this case.</p>
<p>There are more things in the program, for example you can increase or decrease the value for each color using the keyboard to see how diferent colors look like.</p>
<p>Also from the setR, setG, setB functions you can customize what to do for each color, in case you use diferent pins i used pin0: red, pin1:common, pin2: blue, pin3: green, feel free to use any other combination but remember to change those functions.</p>
<p>Any questions are welcome.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://umkk.eu/mood-light/01/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://umkk.eu/mood-light/01/&amp;title=Mood+light" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://umkk.eu/mood-light/01/&amp;title=Mood+light" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://umkk.eu/mood-light/01/&amp;title=Mood+light&amp;desc=I%20wanted%20to%20build%20this%20for%20o%20long%20time...%20and%20today%20I%20finally%20had%20the%20%22mood%22%20and%20the%20time%20to%20do%20it...%20it%27s%20a%20mood%20light%20created%20with%20a%20tricolor%20led%20and%20a%20laptop%20with%20a%20parallel%20port.%0D%0AI%20did%20this%20to%20see%20what%20is%20required%20to%20create%20a%20mood%20light%2C%20because%20the%20plan%20is%20to%20create%20one%20with%20a%20pic%20microcontrol" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://umkk.eu/mood-light/01/&amp;t=Mood+light" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Mood+light&amp;body=Link: http://umkk.eu/mood-light/01/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A I%20wanted%20to%20build%20this%20for%20o%20long%20time...%20and%20today%20I%20finally%20had%20the%20%22mood%22%20and%20the%20time%20to%20do%20it...%20it%27s%20a%20mood%20light%20created%20with%20a%20tricolor%20led%20and%20a%20laptop%20with%20a%20parallel%20port.%0D%0AI%20did%20this%20to%20see%20what%20is%20required%20to%20create%20a%20mood%20light%2C%20because%20the%20plan%20is%20to%20create%20one%20with%20a%20pic%20microcontrol" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://umkk.eu/mood-light/01/&amp;title=Mood+light" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://umkk.eu/mood-light/01/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://umkk.eu/mood-light/01/&amp;bm_description=Mood+light&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://umkk.eu/mood-light/01/&amp;title=Mood+light" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://umkk.eu/mood-light/01/&amp;title=Mood+light" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://umkk.eu/mood-light/01/&amp;title=Mood+light" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://umkk.eu/mood-light/01/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Mood+light+-+http://b2l.me/6hn7k&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>



<p>Related posts:<ol><li><a href='http://umkk.eu/stepper-motor-inteligent-driver-and-controller/10/' rel='bookmark' title='Permanent Link: Stepper motor inteligent driver and controller'>Stepper motor inteligent driver and controller</a></li>
<li><a href='http://umkk.eu/stepper-motor-controller/01/' rel='bookmark' title='Permanent Link: Stepper motor controller'>Stepper motor controller</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://umkk.eu/mood-light/01/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
