<?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>The Electronics Hobbyist &#187; light</title>
	<atom:link href="http://www.theelectronicshobbyist.com/blog/tag/light/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theelectronicshobbyist.com/blog</link>
	<description>A Passion for Curiosity and Play</description>
	<lastBuildDate>Fri, 20 Jan 2012 14:54:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Arduino RGB LED Control for the Spinning Night Light &#124; Part 4</title>
		<link>http://www.theelectronicshobbyist.com/blog/arduino-rgb-led-control-spinning-night-light/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/arduino-rgb-led-control-spinning-night-light/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 05:00:43 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[light]]></category>
		<category><![CDATA[Ohm's Law]]></category>
		<category><![CDATA[resistor]]></category>
		<category><![CDATA[RGB LED]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=334</guid>
		<description><![CDATA[When looking at the parts list for the Arduino RGB LED spinning night light you must have noticed that current limiting resistors of different values were used for the Red and the Green/Blue pins of the RGB LED. That is due to them having different forward voltage ratings. You can find complete specs for the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>When looking at the <a href="http://www.theelectronicshobbyist.com/blog/2010/07/arduino-rgb-led-spinning-night-light/" target="_blank">parts list for the Arduino RGB LED spinning night light</a> you must have noticed that current limiting resistors of different values were used for the Red and the Green/Blue pins of the <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4212&amp;affiliate_banner_id=1" target="_blank">RGB LED</a>. That is due to them having different forward voltage ratings. You can find complete specs for the LED in the datasheet (when buying an electronic component you will have the option to download its datasheet, or the relevant information will be provided by the vendor).</p>
<p>We use <a href="http://en.wikipedia.org/wiki/Ohm's_law" target="_blank">Ohm&#8217;s Law</a> to calculate current limiting resistor values:<br />
<span id="more-334"></span><br />
Forward voltage ratings:</p>
<blockquote><p>RED: 2.1V<br />
GREEN: 3.3V<br />
BLUE: 3.3V</p></blockquote>
<p>Current:</p>
<blockquote><p>I = 20mA</p></blockquote>
<p>Supply voltage:</p>
<blockquote><p>V = 5V</p></blockquote>
<p>Ohm&#8217;s Law:</p>
<blockquote><p>I = V/R =&gt; R = V/I</p></blockquote>
<p>So for Red:</p>
<blockquote><p>(5 &#8211; 2.1)/0.02 =&gt; R = 145 Ohm</p></blockquote>
<p>For Green/Blue:</p>
<blockquote><p>(5 &#8211; 3.3)/0.02 =&gt; R = 85 Ohm</p></blockquote>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/07/fade.jpg"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="size-medium wp-image-343 alignright" title="fade" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/07/fade-254x300.jpg" alt="color fading for the RGB LED night light" width="254" height="300" /></a>As for the <a href="http://www.theelectronicshobbyist.com/blog/goto/uno" style="" target="_blank" rel="nofollow" onmouseover="self.status='http://www.theelectronicshobbyist.com/blog/goto/uno';return true;" onmouseout="self.status=''">Arduino</a> sketch, I chose to have the lamp fade between two colors, aqua (#00FFFF) and magenta (#FF00FF). For that I kept the Blue value at 255 and varied the Green and Red values between 0-255 to achieve the desired colors, as shown in the diagram:<br />
(You can pick your favorite colors, cycle through the entire spectrum, or go psychedelic and show random colors with random delays)</p>
<pre>// fade from aqua to magenta
  for (int i = 0; i < 256; i++) {
    analogWrite(RED, 255-i);
    analogWrite(GREEN, i);
    analogWrite(BLUE, 0);
    delay(50);
  }

  // fade from magenta to aqua
  for (int i = 0; i < 256; i++) {
    analogWrite(RED, i);
    analogWrite(GREEN, 255-i);
    analogWrite(BLUE, 0);
    delay(50);
  }
</pre>
<p>Here's the <a href="http://www.theelectronicshobbyist.com/blog/2010/07/arduino-rgb-led-spinning-night-light/">full sketch for the night light</a>.</p>
<p>You might also enjoy:<ol>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-rgb-led-spinning-night-light/' rel='bookmark' title='Arduino RGB LED Spinning Night Light | Part 1'>Arduino RGB LED Spinning Night Light | Part 1</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-motor-control-spinning-night-light/' rel='bookmark' title='Arduino Motor Control for the Spinning Night Light | Part 3'>Arduino Motor Control for the Spinning Night Light | Part 3</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-rgb-led-spinning-night-light-assembly/' rel='bookmark' title='Arduino RGB LED Spinning Night Light: Assembly | Part 2'>Arduino RGB LED Spinning Night Light: Assembly | Part 2</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-led-control-using-dip-switch/' rel='bookmark' title='Arduino LED Control Using DIP Switch | Part 1'>Arduino LED Control Using DIP Switch | Part 1</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/arduino-rgb-led-control-spinning-night-light/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino Nano: an Account of Coolness in 4 Links</title>
		<link>http://www.theelectronicshobbyist.com/blog/arduino-nano-an-account-of-coolness-in-4-links/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/arduino-nano-an-account-of-coolness-in-4-links/#comments</comments>
		<pubDate>Tue, 18 May 2010 05:00:05 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[light]]></category>
		<category><![CDATA[Nano]]></category>
		<category><![CDATA[sound]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=100</guid>
		<description><![CDATA[Light: how do you feel today? Find out with the interactive, multi-function mood light: http://www.instructables.com/id/Interactive-Open-Source-Mood-Light/ Sound: have you ever played with water filled crystal glasses to make sound? How about using an Arduino Nano to control the music? Check out this cool video: http://www.vimeo.com/1261369 Game: it&#8217;s no Wii, but this simple version of Super Mario [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4235&amp;affiliate_banner_id=1" target="_blank"><img class="alignright size-full wp-image-101" style="margin: 5px;;  float: right; padding: 4px; margin: 0 0 2px 7px;" title="arduino-nano" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/05/arduino-nano.jpg" alt="Arduino Nano" width="167" height="200" /></a></p>
<ol>
<li><strong>Light</strong>: how do you feel today? Find out with the interactive, multi-function mood light: <a href="http://www.instructables.com/id/Interactive-Open-Source-Mood-Light/" target="_blank">http://www.instructables.com/id/Interactive-Open-Source-Mood-Light/</a></li>
<li><strong>Sound</strong>: have you ever played with water filled crystal glasses to make sound? How about using an Arduino Nano to control the music? Check out this cool video: <a href="http://www.vimeo.com/1261369" target="_blank">http://www.vimeo.com/1261369</a></li>
<li><strong>Game</strong>: it&#8217;s no Wii, but this simple version of Super Mario Bros using an 8&#215;8 LED matrix rocks: <a href="http://vimeo.com/9928343" target="_blank">http://vimeo.com/9928343</a></li>
<li><strong>iPod</strong>: an <a href="http://www.theelectronicshobbyist.com/blog/goto/uno" style="" target="_blank" rel="nofollow" onmouseover="self.status='http://www.theelectronicshobbyist.com/blog/goto/uno';return true;" onmouseout="self.status=''">Arduino</a>-based iPod remote with a single button that toggles between Play and Pause on the iPod: <a href="http://davidfindlay.org/weblog/files/2009_09_07_ipod_remote.php" target="_blank">http://davidfindlay.org/weblog/files/2009_09_07_ipod_remote.php</a></li>
</ol>
<p><strong><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4235&amp;affiliate_banner_id=1" target="_blank">Buy the Arduino Nano Ver 3.0</a></strong></p>
<p>The Nano at the official Arduino website: <a href="http://www.arduino.cc/en/Main/ArduinoBoardNano" target="_blank">http://www.arduino.cc/en/Main/ArduinoBoardNano</a></p>
<p>You might also enjoy:<ol>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-mega-an-account-of-coolness-in-4-links/' rel='bookmark' title='Arduino Mega: an Account of Coolness in 4 Links'>Arduino Mega: an Account of Coolness in 4 Links</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-lilypad-an-account-of-coolness-in-4-links/' rel='bookmark' title='Arduino Lilypad: an Account of Coolness in 4 Links'>Arduino Lilypad: an Account of Coolness in 4 Links</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-mini-an-account-of-coolness-in-4-links/' rel='bookmark' title='Arduino Mini: an Account of Coolness in 4 Links'>Arduino Mini: an Account of Coolness in 4 Links</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/an-arduino-for-any-project/' rel='bookmark' title='An Arduino for Any Project'>An Arduino for Any Project</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/arduino-nano-an-account-of-coolness-in-4-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.theelectronicshobbyist.com @ 2012-02-06 22:20:49 -->
