<?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</title>
	<atom:link href="http://www.theelectronicshobbyist.com/blog/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>The &#8220;Identified Plush Object Network&#8221; (IPON) Project</title>
		<link>http://www.theelectronicshobbyist.com/blog/the-identified-plush-object-network-ipon-project/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/the-identified-plush-object-network-ipon-project/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 05:00:25 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[IPON]]></category>
		<category><![CDATA[RFID]]></category>
		<category><![CDATA[The Internet of Things]]></category>
		<category><![CDATA[WiFi]]></category>
		<category><![CDATA[XBee]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=621</guid>
		<description><![CDATA[The Identified Plush Object Network is one of a few bigger projects that I want to work on this year. The idea is to create a network of small plush animals that interact with users, each other, and the Internet. I called it &#8220;Identified&#8221; because as a separate project I&#8217;m working with an RFID reader/writer [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2012/01/plush-object.jpg"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class=" wp-image-679 alignleft" title="plush-object" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2012/01/plush-object-298x300.jpg" alt="Plush Object" width="209" height="210" /></a>The Identified Plush Object Network is one of a few bigger projects that I want to work on this year. The idea is to create a network of small plush animals that interact with users, each other, and the Internet. I called it &#8220;Identified&#8221; because as a separate project I&#8217;m working with an RFID reader/writer module I want to create a simpler interface for, and once that piece is working each object in the network will be tagged as well.</p>
<p>The motivation for the project is non-profit work I want to do in the future with at-risk teenagers here in Orange County, CA. I want to create something that can be built in phases that get increasingly complex as the students learn, but that starts simple enough to enable hands-on participation from day one. Software improvements will be made in each iteration.<span id="more-621"></span></p>
<p>Each plush animal will house electronics that will be “surgically” implanted. While the project is being designed I&#8217;m thinking of using soft circuits or even cardboard circuits wired with EFT tape instead of stripboards to make it easy to modify them while I&#8217;m still making decisions.</p>
<h2>Cost Considerations</h2>
<p>One of my requirements – due to the non-profit nature of this project – is to try to keep cost as low as possible, but maintaining simplicity. For example, even though the cheapest possible Arduino may be a homebrew version, I decided I will be using the <a href="http://www.theelectronicshobbyist.com/blog/goto/ardweeny" style="" target="_blank" rel="nofollow" onmouseover="self.status='http://www.theelectronicshobbyist.com/blog/goto/ardweeny';return true;" onmouseout="self.status=''">Ardweeny</a> (it is cheap enough and simpler to put together).</p>
<p>Another example of the cost x simplicity trade-off is the Internet of Things aspect of the project. The <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4363" target="_blank">WiFi RedBack</a> costs $63 at the time of this writing (but includes 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>), versus $24 for the barebones WiFi module (the MRF24WB0MA by MicroChip). I&#8217;m just not sure if the savings are worth the added complexity. (Here&#8217;s <a href="http://jmsarduino.blogspot.com/2011/11/wifi-module-for-arduino-projects.html" target="_blank">an example</a> that uses this module). I also have to consider only one of the nodes/objects needs to have WiFi capability. Communication within the networked objects will happen over XBee.</p>
<h2>Power Requirements</h2>
<p>Another factor that will drive design decisions is power – I want to learn how to design for lower power, and I&#8217;m aware this may be a whole subject all on its own given the many choices of battery types and cost considerations as well. Baby steps. I&#8217;ll get there.</p>
<h3>Phases of the Project</h3>
<p>As of yet the IPON project is not defined on a detailed level, except for Phase 0. From a high-level perspective I have envisioned the following phases in small increments over the previous one (with each going through several iterations and refinements):</p>
<h4>Phase 0 (current):</h4>
<ul>
<li><a href="http://www.theelectronicshobbyist.com/blog/goto/breadboard" style="" target="_blank" rel="nofollow" onmouseover="self.status='http://www.theelectronicshobbyist.com/blog/goto/breadboard';return true;" onmouseout="self.status=''">Breadboard</a> circuit and rough sketch for Phase 1</li>
</ul>
<h4>Phase 1:</h4>
<ul>
<li>Semi-permanent circuit</li>
<li>1 plush object with implanted electronics</li>
<li>Interacts with user</li>
</ul>
<h4>Phase 2:</h4>
<ul>
<li>Semi-permanent circuit</li>
<li>1 plush object</li>
<li>Interacts with user</li>
<li>Interacts with the Internet</li>
</ul>
<h4>Phase 3:</h4>
<ul>
<li>Semi-permanent circuit</li>
<li>2 plush objects</li>
<li>Interact with user</li>
<li>Interact with each other</li>
</ul>
<h4>Phase 4:</h4>
<ul>
<li>Semi-permanent circuit</li>
<li>3+ objects</li>
<li>Interact with user</li>
<li>Interact with each other</li>
<li>Interact with the Internet</li>
</ul>
<h4>Phase 5:</h4>
<ul>
<li>Permanent circuit</li>
<li>3+ objects</li>
<li>Interact with user</li>
<li>Interact with each other</li>
<li>Interact with the Internet</li>
<li>RFID tags</li>
</ul>
<p>IPON project, the big picture:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2012/01/IPON-project-diagram.jpg"><img class="alignnone  wp-image-678" title="IPON-project-diagram" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2012/01/IPON-project-diagram.jpg" alt="Identified Plush Object Network Diagram" width="594" height="432" /></a></p>
<p>On the next post I will share the current state of the project, Phase 0 as described above, including circuit and Arduino sketch. Stay tuned!</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/the-identified-plush-object-network-ipon-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Motion and Light Sensors with Arduino (and Without)</title>
		<link>http://www.theelectronicshobbyist.com/blog/motion-and-light-sensors-with-arduino-and-without/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/motion-and-light-sensors-with-arduino-and-without/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 08:00:13 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Reader Mailbag]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[circuit]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[diode]]></category>
		<category><![CDATA[LDR]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[light dependent resistor]]></category>
		<category><![CDATA[logic probe]]></category>
		<category><![CDATA[motion sensor]]></category>
		<category><![CDATA[multimeter]]></category>
		<category><![CDATA[PIR]]></category>
		<category><![CDATA[sketch]]></category>
		<category><![CDATA[transistor]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=606</guid>
		<description><![CDATA[I have recently received the following question from a reader: I&#8217;m looking for a circuit board design that will need to turn on an array of LEDs when motion is detected during the day time, and also stay on continuously during the night time; using the Arduino would be nice. The project that I am [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I have recently received the following question from a reader:</p>
<blockquote><p>I&#8217;m looking for a circuit board design that will need to turn on an array of LEDs when motion is detected during the day time, and also stay on continuously during the night time; using the Arduino would be nice. The project that I am working on is just a picture frame with my artwork in it. The art is actually an embossed piece. The light that I am placing within the frame will shine across the embossed art, and reflect off the raised areas of paper and make the picture appear more three-dimensional. So, the picture acts as a night light when it&#8217;s dark, and then turns on for a moment during the day time when some approaches the picture.</p></blockquote>
<p>I suspected there had to be a simple circuit to accomplish this without having to program a microcontroller to take care of triggering the light. I could see that was overkill; after all, it is just a way to switch lights on/off. Still, I had no idea how to do it, if not from a software point of view.<br />
<span id="more-606"></span><br />
Well, he mentioned the Arduino in his email, and I wanted to give him a quick response, so I put together a prototype to achieve the effect he desired. I properly warned him that might not be the best solution, but since he wanted to tinker with the Arduino, that would be a simple sketch.</p>
<p>I suggested the use of a compact Arduino clone like the <a href="http://www.theelectronicshobbyist.com/blog/goto/ardweeny">Ardweeny</a> (check out &#8220;<a title="LED Bar Graph: Testing the Ardweeny" href="http://www.theelectronicshobbyist.com/blog/led-bar-graph-testing-the-ardweeny/">Testing the Ardweeny</a>&#8221; to see how tiny it is!)</p>
<p>Then, soldering everything onto a stripboard should result in a small footprint that would not detract from his art piece.</p>
<p>Anyway, here&#8217;s a <a href="http://fritzing.org/" target="_blank">Fritzing</a> diagram that shows how to wire the circuit:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/fritzing1.jpg"><img class="alignnone  wp-image-635" title="fritzing1" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/fritzing1.jpg" alt="Fritzing diagram for motion-triggered light using Arduino" width="557" height="601" /></a></p>
<p>You can see the Arduino, LDR (light sensor, the component with the &#8220;squiggly&#8221; line), LED and PIR (motion sensor, the black &#8220;mystery&#8221; component to the right &#8212; the Fritzing version I&#8217;m using has no PIR component and I still don&#8217;t know how to add a custom component the proper way).</p>
<p>Here&#8217;s an <a href="http://www.ladyada.net/learn/sensors/pir.html" target="_blank">excellent tutorial</a> on the use of PIRs, from Ladyada who did create her own component on Fritzing.</p>
<p>And here&#8217;s a picture of the setup:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/pic1.jpg"><img class="alignnone  wp-image-639" title="pic1" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/pic1.jpg" alt="Circuit for the motion-triggered light with Arduino" width="570" height="492" /></a></p>
<p>Bill of Materials (include parts used for both Arduino and non-Arduino* versions):</p>
<ul>
<li><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4651" target="_blank">Breadboard</a></li>
<li>Power* (I used <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4414" target="_blank">this breakout board</a> connected to my USB; power pins only)</li>
<li>1 <a href="http://www.avantlink.com/click.php?tt=cl&amp;mi=10609&amp;pw=21273&amp;url=http%3A%2F%2Fwww.jameco.com%2Fwebapp%2Fwcs%2Fstores%2Fservlet%2FProduct_10001_10001_202403_-1" target="_blank">photocell</a> (light dependent resistor/LDR)</li>
<li>1 <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4290" target="_blank">motion sensor</a> (passive infrared sensor/PIR)</li>
<li><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4447" target="_blank">Arduino</a> (any flavor)</li>
<li>1 NPN transistor* (<a href="http://www.avantlink.com/click.php?tt=cl&amp;mi=10609&amp;pw=21273&amp;url=http%3A%2F%2Fwww.jameco.com%2Fwebapp%2Fwcs%2Fstores%2Fservlet%2FProduct_10001_10001_254781_-1" target="_blank">BC548B</a>) (for the PIR)</li>
<li>1 PNP transistor* (<a href="http://www.avantlink.com/click.php?tt=cl&amp;mi=10609&amp;pw=21273&amp;url=http%3A%2F%2Fwww.jameco.com%2Fwebapp%2Fwcs%2Fstores%2Fservlet%2FProduct_10001_10001_178618_-1" target="_blank">2N3906</a>) (for the LDR)</li>
<li>2 <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4383" target="_blank">10K Ohm resistors</a>* (Arduino version uses only 1)</li>
<li>2 diodes (<a href="http://www.avantlink.com/click.php?tt=cl&amp;mi=10609&amp;pw=21273&amp;url=http%3A%2F%2Fwww.jameco.com%2Fwebapp%2Fwcs%2Fstores%2Fservlet%2FProduct_10001_10001_655269_-1" target="_blank">1N914A</a>)*</li>
<li>1 <a href="http://www.avantlink.com/click.php?tt=cl&amp;mi=10609&amp;pw=21273&amp;url=http%3A%2F%2Fwww.jameco.com%2Fwebapp%2Fwcs%2Fstores%2Fservlet%2FProduct_10001_10001_94714_-1" target="_blank">10K trimpot</a>*</li>
<li><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4242" target="_blank">Jumper wire</a> (male-to-male, assorted lengths)</li>
<li>1 <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4215" target="_blank">LED</a></li>
<li>2 180 Ohm resistors* (<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> version uses only 1) (<a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4374" target="_blank">200 Ohm</a> will work, too)</li>
<li><a href="http://www.amazon.com/gp/product/B000FLVJ3Q/ref=as_li_ss_tl?ie=UTF8&amp;tag=mpu-proj-20&amp;linkCode=as2&amp;camp=217145&amp;creative=399373&amp;creativeASIN=B000FLVJ3Q" target="_blank">Multimeter</a> (optional, but helpful)</li>
<li><a href="http://www.amazon.com/gp/product/B000Z9HAP4/ref=as_li_ss_tl?ie=UTF8&amp;tag=mpu-proj-20&amp;linkCode=as2&amp;camp=217145&amp;creative=399373&amp;creativeASIN=B000Z9HAP4" target="_blank">Logic probe</a> (optional, but helpful)</li>
</ul>
<p>Here&#8217;s a <a href="http://www.youtube.com/watch?v=QuzCGq8SZPM" target="_blank">video</a> showing the concept:</p>
<p>(On a side note I have now acquired a HD flip camera so I don&#8217;t have to use my phone to record videos anymore).</p>
<p>OK, here’s the Arduino sketch:</p>
<pre><span style="color: #7e7e7e;">/* www.TheElectronicsHobbyist.com/blog</span>
<span style="color: #7e7e7e;"> * Natalia Fargasch Norman</span>
<span style="color: #7e7e7e;"> * Motion detection using Arduino</span>
<span style="color: #7e7e7e;"> */</span>

#define LDR 0
#define PIR 2
#define LED 3

<span style="color: #cc6600;">int</span> pirState;
<span style="color: #cc6600;">int</span> ldrValue;

<span style="color: #cc6600;">void</span> <span style="color: #cc6600;"><strong>setup</strong></span>() {
  <span style="color: #7e7e7e;">//Serial.begin(9600);</span>
  <span style="color: #cc6600;">pinMode</span>(LED, <span style="color: #006699;">OUTPUT</span>);
  <span style="color: #cc6600;">pinMode</span>(PIR, <span style="color: #006699;">INPUT</span>);
  <span style="color: #cc6600;">digitalWrite</span>(LED, <span style="color: #006699;">LOW</span>);
}

<span style="color: #cc6600;">void</span> <span style="color: #cc6600;"><strong>loop</strong></span>(){
  ldrValue = <span style="color: #cc6600;">analogRead</span>(LDR);
  <span style="color: #7e7e7e;">//Serial.print("Analog reading = ");</span>
  <span style="color: #7e7e7e;">//Serial.println(ldrValue);</span>

  <span style="color: #cc6600;">if</span> (ldrValue &lt;= 512) { <span style="color: #7e7e7e;">// dark</span>
    <span style="color: #cc6600;">digitalWrite</span>(LED, <span style="color: #006699;">HIGH</span>);
  } 
  <span style="color: #cc6600;">else</span> { <span style="color: #7e7e7e;">// ldrValue &gt; 512</span>
    pirState = <span style="color: #cc6600;">digitalRead</span>(PIR);
    <span style="color: #cc6600;">if</span> (pirState == <span style="color: #006699;">HIGH</span>) {
      <span style="color: #cc6600;">digitalWrite</span>(LED, <span style="color: #006699;">HIGH</span>);
      <span style="color: #cc6600;">delay</span>(5000);
      <span style="color: #cc6600;">digitalWrite</span>(LED, <span style="color: #006699;">LOW</span>);
      <span style="color: #cc6600;">delay</span>(1000);
    } 
    <span style="color: #cc6600;">else</span> { <span style="color: #7e7e7e;">// pirState == LOW</span>
      <span style="color: #cc6600;">digitalWrite</span>(LED, <span style="color: #006699;">LOW</span>);
    }
  }
  <span style="color: #7e7e7e;">// The processing in the Arduino occurs faster</span>
  <span style="color: #7e7e7e;">// than the response from the PIR, and adding this delay</span>
  <span style="color: #7e7e7e;">// eliminated a flickering on the LED</span>
  <span style="color: #cc6600;">delay</span>(1000);
}</pre>
<p>The idea is to trigger the light when it&#8217;s dark; otherwise, trigger it for a short duration if motion is detected. This simple Arduino sketch does just that. A light dependent resistor is connected to an analog pin on the Arduino, and reading from it will either trigger the light (if it&#8217;s dark) or have the Arduino check for motion by reading from the motion sensor connected to a digital pin (if it&#8217;s not dark).</p>
<h3>And finally&#8230; a non-Arduino version!</h3>
<p>A few days and a couple of aha! moments later, I finally figured out how to accomplish the same behavior without using a microcontroller.</p>
<p>I knew an OR gate could be used to trigger the LED (output) on either (or both, doesn&#8217;t matter) condition: darkness or motion detected. The PIR outputs either 0 (no motion detected) or 1 (motion detected). But what about the light detection piece of the circuit? The LDR gives me an analog reading, and I needed a 0 or a 1 as inputs to the OR gate.</p>
<p>When later reading about transistors in Forrest Mims&#8217; &#8220;<a href="http://www.amazon.com/gp/product/0945053282/ref=as_li_ss_tl?ie=UTF8&amp;tag=mpu-proj-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0945053282" target="_blank">Getting Started in Electronics</a>&#8221; it occurred to me that I could use one as a switch on the LDR part of the circuit to generate the second input to the OR gate.</p>
<p>So I excitedly went to Marvac (my trusty local electronics shop) to buy OR gates; unfortunately, they were out of stock&#8230; <img src='http://www.theelectronicshobbyist.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>But then, again courtesy of Forrest Mims, I learned how to build my own OR gate using two rectifier diodes. (And I had the necessary parts!)</p>
<p>Here&#8217;s how it&#8217;s wired:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/or.jpg"><img class="alignnone size-medium wp-image-630" title="diode-or-gate" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/or-202x300.jpg" alt="Diode OR Gate" width="202" height="300" /></a></p>
<h3>Now on to the complete circuit&#8230;</h3>
<p>First I hooked up the LED to the OR circuit to test that it worked. <em>Check</em>.</p>
<p>Then I connected the PIR to the LED to make sure that it woks, i.e. LED lights up when there is motion detected. <em>Check</em>.</p>
<p>Then I connected the PIR to be the first input of the OR gate&#8230; <em>and it didn&#8217;t work</em>.</p>
<p>I hooked up the LDR as the second input to the OR gate and that part&#8230; <em>&#8220;kind of&#8221; worked</em>. (LED off when dark and on when light; should be the other way around). I had used an NPN transistor, so I just switched to a PNP instead and it worked. Makes sense!</p>
<p>This is how it was hooked up: Emitter to ground, Collector to load (the LED) and Base to LDR. The LDR was connected to a 10K <a title="Pull Up Resistors" href="http://www.theelectronicshobbyist.com/blog/pull-up-resistors/">pull-up resistor</a> and a potentiometer (to fine tune the amount of darkness it takes to trigger the LED).</p>
<p>But the PIR part of the circuit was still &#8220;kaputt&#8221;&#8230; I checked with the logic probe and found out that there was a signal coming to the LED. I replaced it with a diffused LED and could see that it was actually on, just veeeery faint.</p>
<p>Using a multimeter I measured the voltage between the LED leads and it was 2.3V. My power source was 4.92V. It seems that the PIR causes a voltage drop&#8230;</p>
<p>Then I looked at the datasheet for the Parallax PIR I have (note to self: that should definitely NOT be an afterthought), and learned that there are two versions, and that mine requires a transistor or a MOSFET to drive external loads.</p>
<p>I hooked up a random (I&#8217;m no EE!) transistor (a 2N2222) and now the LED is brighter. But still not as bright as when I cover the LDR.</p>
<p>Looking at the current values, my multimeter read:</p>
<blockquote><p>Current through the LED when the LDR portion of the circuit is active: 4.2mA<br />
Current through the LED when the PIR portion of the circuit is active: 0.8mA</p></blockquote>
<p>The only other transistors I had were 2N3904, so I decided to try that one. The LED was much brighter and the current read 2.4mA. With a base current of 0.02mA I was getting a gain of 40 with the 2N2222 and 120 with the 2N3904.</p>
<p>I checked the datasheets for these two transistors, and these gain values were consistent. After some research it seems the BC548B is a better amplifier transistor for this application, and has a minimum gain of 200.</p>
<p>Here’s what the circuit looks like on Fritzing:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/fritzing2.jpg"><img class="alignnone  wp-image-636" title="fritzing2" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/fritzing2-1024x339.jpg" alt="Fritzing diagram for motion-triggered light" width="553" height="183" /></a></p>
<p>And here’s a picture of the real thing:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/pic2.jpg"><img class="alignnone  wp-image-640" title="pic2" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/pic2.jpg" alt="Circuit for the motion-triggered light" width="576" height="432" /></a></p>
<p>By the way, I heard back from my reader; he bought the <a href="http://www.ladyada.net/make/boarduino/" target="_blank">Boarduino from Adafruit</a>, not the <a href="http://www.theelectronicshobbyist.com/blog/led-bar-graph-testing-the-ardweeny/" title="LED Bar Graph: Testing the Ardweeny">Ardweeny</a>, and successfully built his &#8220;darkness-or-motion-triggered artwork illumination&#8221; project.</p>
<p>Keep sending me your questions; I love to see what you are working on, and it helps me on my learning journey as well. (Explaining something to somebody else is the best way to learn). I will also from time to time publish some of your questions here. (If you have an electronics blog let me know and I will include it here).</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/motion-and-light-sensors-with-arduino-and-without/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Workbench Challenge Update</title>
		<link>http://www.theelectronicshobbyist.com/blog/workbench-challenge-update/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/workbench-challenge-update/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 22:22:35 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Workbench]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[electronics hobby]]></category>
		<category><![CDATA[supplies]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=575</guid>
		<description><![CDATA[Back in April I posted about a goal I had for this year: setting up a decent workbench for myself in a corner of my (minuscule) home office. As the year comes to an end, I think it&#8217;s time for an update. Did it happen exactly as planned? No&#8230; Did I make progress? Yes! So [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4242" target="_blank"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="wp-image-610 alignleft" title="jumper-wires" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/jumper-wires-300x300.jpg" alt="Wire mess" width="216" height="216" /></a>Back in April I posted about a goal I had for this year: <a title="The 2011 Workbench Challenge" href="http://www.theelectronicshobbyist.com/blog/the-2011-workbench-challenge/">setting up a decent workbench</a> for myself in a corner of my (minuscule) home office. As the year comes to an end, I think it&#8217;s time for an update.</p>
<p>Did it happen exactly as planned? No&#8230;</p>
<p>Did I make progress? Yes!</p>
<h3>So what happened?</h3>
<p><span id="more-575"></span><br />
We&#8217;re in limbo right now. We live in a rented apartment, which the owner has put on the market for sale. That means at any given day we may get a 30-day notice to vacate. I simply didn&#8217;t feel it was worth it to go all the way with getting rid of stuff to make room for a bigger table (it will inevitably happen when we have to move) and buying the table/bench (that would have to fit the exact dimensions of the space available here, possibly not being the ideal size for the next place) just yet.</p>
<p>I did make some improvements: I doubled my work area (with an additional table &#8211; another dinner tray table! &#8211; I use when I&#8217;m working on something) and I added a few items to my set of equipment. I got a <a href="http://www.amazon.com/gp/product/B000FLVJ3Q/ref=as_li_ss_tl?ie=UTF8&amp;tag=mpu-proj-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000FLVJ3Q" target="_blank">digital multimeter</a> (my old one is analog, which I still keep as I read it can be useful to show changes in values) a <a href="http://www.amazon.com/gp/product/B000CSQK5E/ref=as_li_ss_tl?ie=UTF8&amp;tag=mpu-proj-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000CSQK5E" target="_blank">bench-top power supply</a>, hot glue gun, several <a href="http://www.amazon.com/gp/product/B0002H4W0K/ref=as_li_ss_tl?ie=UTF8&amp;tag=mpu-proj-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B0002H4W0K" target="_blank">large breadboards</a>, much needed tools and a myriad of parts.</p>
<p>All in all I don&#8217;t have the workbench I had envisioned (yet), but I have a bigger workspace, much needed new equipment and a lot more parts to play with!</p>
<p>On a related note, I came up with ideas for two bigger projects I want to work on which will be ongoing, in addition to the small stuff I build for learning purposes. I&#8217;ve placed quite a few orders from <a href="http://www.digikey.com/" target="_blank">DigiKey</a>, <a href="http://www.avantlink.com/click.php?tt=ml&amp;amp;ti=24085&amp;amp;pw=21273" target="_blank">Jameco clearance center</a> and <a href="http://www.cutedigi.com/index.php?ref=3&amp;cPath=277" target="_blank">CuteDigi</a> lately, that I&#8217;m sure my husband now fears I have a shopping addiction&#8230; I am excited to start working on these projects and sharing them here. Stay tuned!</p>
<p>My current setup:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/overview.jpg"><img class="size-medium wp-image-588 alignnone" title="overview" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/overview-300x225.jpg" alt="Messy home office" width="300" height="225" /></a></p>
<p>The work area:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/table2.jpg"><img class="alignnone size-medium wp-image-589" title="table2" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/table2-300x225.jpg" alt="Messy electronics workbench" width="300" height="225" /></a></p>
<p>And storage:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/storage2.jpg"><img class="alignnone size-medium wp-image-590" title="storage2" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/12/storage2-225x300.jpg" alt="Messy electronics storage" width="225" height="300" /></a></p>
<p>How about you? What is your workbench setup like? Are you planning any improvements and/or additions in 2012?</p>
<p>You might also enjoy:<ol>
<li><a href='http://www.theelectronicshobbyist.com/blog/the-2011-workbench-challenge/' rel='bookmark' title='The 2011 Workbench Challenge'>The 2011 Workbench Challenge</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/workbench-challenge-update/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>LED Patterns Using DIP Switch and Arduino</title>
		<link>http://www.theelectronicshobbyist.com/blog/led-patterns-using-dip-switch-and-arduino/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/led-patterns-using-dip-switch-and-arduino/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 06:00:31 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Beginner]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[DIP switch]]></category>
		<category><![CDATA[sketch]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=533</guid>
		<description><![CDATA[When I posted the “LED Control Using DIP Switch” sketch last year (a simple setup the turned on the LED corresponding to that switch position), I also had a slightly modified version of it in which the DIP switch controlled six different light patterns on the LEDs (scroll right, left, in, out, back and forth [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>When I posted the “<a href="http://www.theelectronicshobbyist.com/blog/2010/09/arduino-led-control-using-dip-switch/">LED Control Using DIP Switch</a>” sketch last year (a simple setup the turned on the <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4215" target="_blank">LED</a> corresponding to that switch position), I also had a slightly modified version of it in which the <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4318" target="_blank">DIP switch</a> controlled six different light patterns on the LEDs (scroll right, left, in, out, back and forth and random). It presented a “cleaned-up” version of the code using <span style="font-family: 'Courier New';">for</span> loops and compared it to the “long-hand” version, showing the trade-off between ease of understanding and conciseness. Except that… I forgot to post it.</p>
<p>Last week someone contacted me asking a question about a similar project he is working on and when I wanted to refer him to this modified sketch I realized it wasn’t on the blog. (Here’s the <a href="http://www.theelectronicshobbyist.com/blog/2010/09/arduino-led-control-using-dip-switch/">original sketch</a> and <a href="http://www.theelectronicshobbyist.com/blog/2010/09/arduino-led-control-using-dip-switch-schematic/">schematic</a> for reference).<span id="more-533"></span></p>
<p>What follows below is the missing blog post (not anymore), a comparison between the more readable sketch (easier for beginners to understand) and the more concise version, in a series of snippets showing the main differences between the two versions of the sketch.</p>
<p>The concise version generates a binary sketch that occupies approximately 25% less memory and is almost half as long in lines of code. The entire source code listings are at the very bottom of this post.</p>
<p><em>Note: the line above each snippet reflects the modification that shortened the sketch.</em></p>
<p>1) not using <span style="font-family: 'Courier New';">#define</span> directives for the LED and switch pins on the <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4447" target="_blank">Arduino</a> in order to use <span style="font-family: 'Courier New';">for</span> loops:</p>
<table border="1">
<tbody>
<tr>
<td>
<pre>    } else {
     // default: off
     digitalWrite(LED1, LOW);
     digitalWrite(LED2, LOW);
     digitalWrite(LED3, LOW);
     digitalWrite(LED4, LOW);
     digitalWrite(LED5, LOW);
     digitalWrite(LED6, LOW);
   }</pre>
</td>
<td>
<pre>    } else {
     // default: off
     for (i = 13; i &gt;= 8; i--) {
       digitalWrite(i, LOW);
     }</pre>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>2) using a state variable array (and consequently a <span style="font-family: 'Courier New';">for</span> loop) as opposed to individual state variables:</p>
<table border="1">
<tbody>
<tr>
<td>
<pre>   s1state = digitalRead(S1);
   s2state = digitalRead(S2);
   s3state = digitalRead(S3);
   s4state = digitalRead(S4);
   s5state = digitalRead(S5);
   s6state = digitalRead(S6);</pre>
</td>
<td>
<pre>   for (i = 0, j = 7; i &lt; 6, j &gt;= 2; i++, j--) {
     state[i] = digitalRead(j);
   }</pre>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>3) <span style="font-family: 'Courier New';">if (x)</span> versus <span style="font-family: 'Courier New';">if (x == 1)</span> (when <span style="font-family: 'Courier New';">x</span> is either <span style="font-family: 'Courier New';">0</span> or <span style="font-family: 'Courier New';">1</span>, then the (<span style="font-family: 'Courier New';">x == 1)</span> expression can be written as simply (<span style="font-family: 'Courier New';">x</span>)):</p>
<table border="1">
<tbody>
<tr>
<td>
<pre>    } else if (s5state == 1) {
     // scroll back and forth</pre>
</td>
<td>
<pre>    } else if (state[4]) {
     // scroll back and forth</pre>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>4) long, repetitive code to randomly turn on or not each LED (for a random duration up to 300 milliseconds) replaced with <span style="font-family: 'Courier New';">for</span> loop:</p>
<table border="1">
<tbody>
<tr>
<td>
<pre>    } else if (s6state == 1) {
     // random
     randomSeed(analogRead(3));
     onoroff = random(0, 2);
     millisecs = random(0, 301);
     digitalWrite(LED1, onoroff);
     delay(millisecs);
     randomSeed(analogRead(3));
     onoroff = random(0, 2);
     millisecs = random(0, 301);
     digitalWrite(LED2, onoroff);
     delay(millisecs);
     randomSeed(analogRead(3));
     onoroff = random(0, 2);
     millisecs = random(0, 301);
     digitalWrite(LED3, onoroff);
     delay(millisecs);
     randomSeed(analogRead(3));
     onoroff = random(0, 2);
     millisecs = random(0, 301);
     digitalWrite(LED4, onoroff);
     delay(millisecs);
     randomSeed(analogRead(3));
     onoroff = random(0, 2);
     millisecs = random(0, 301);
     digitalWrite(LED5, onoroff);
     delay(millisecs);
     randomSeed(analogRead(3));
     onoroff = random(0, 2);
     millisecs = random(0, 301);
     digitalWrite(LED6, onoroff);
     delay(millisecs);
   }</pre>
</td>
<td>
<pre>    } else if (state[5]) {
     // random
     for (i = 13; i &gt;= 8; i--) {
       randomSeed(analogRead(i - 8));
       onoroff = random(0, 2);
       millisecs = random(0, 301);
       digitalWrite(i, onoroff);
       delay(millisecs);
     }
   }</pre>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Here’s the full long version:</p>
<ul>
<li>Binary sketch size: 3654 bytes</li>
<li>Code size was sacrificed in order to improve readability for beginners</li>
<li>Sketch length: 205 lines</li>
</ul>
<div style="width: 500px; height: 500px; overflow: auto; border: #cccccc 1px solid; padding: 5px;">
<pre>  // www.TheElectronicsHobbyist.com/blog
  // Natalia Fargasch Norman
  // LED control via DIP switches

  // <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> pins used for the LEDs
  #define LED1 13
  #define LED2 12
  #define LED3 11
  #define LED4 10
  #define LED5 9
  #define LED6 8

  // Arduino pins used for the switches
  #define S1 7
  #define S2 6
  #define S3 5
  #define S4 4
  #define S5 3
  #define S6 2

  // State of each switch (0 or 1)
  int s1state;
  int s2state;
  int s3state;
  int s4state;
  int s5state;
  int s6state;

  // Random values for LED state and delay
  long onoroff;
  long millisecs;

  void setup() {
    // pins for LEDs are outputs
    pinMode(LED1, OUTPUT);
    pinMode(LED2, OUTPUT);
    pinMode(LED3, OUTPUT);
    pinMode(LED4, OUTPUT);
    pinMode(LED5, OUTPUT);
    pinMode(LED6, OUTPUT);
    // pins for switches are inputs
    pinMode(S1, INPUT);
    pinMode(S2, INPUT);
    pinMode(S3, INPUT);
    pinMode(S4, INPUT);
    pinMode(S5, INPUT);
    pinMode(S6, INPUT);
  }

  void loop() {
    s1state = digitalRead(S1);
    s2state = digitalRead(S2);
    s3state = digitalRead(S3);
    s4state = digitalRead(S4);
    s5state = digitalRead(S5);
    s6state = digitalRead(S6);
    if (s1state == 1) {
      // scroll right
      digitalWrite(LED1, HIGH);
      delay(250);
      digitalWrite(LED1, LOW);
      digitalWrite(LED2, HIGH);
      delay(250);
      digitalWrite(LED2, LOW);
      digitalWrite(LED3, HIGH);
      delay(250);
      digitalWrite(LED3, LOW);
      digitalWrite(LED4, HIGH);
      delay(250);
      digitalWrite(LED4, LOW);
      digitalWrite(LED5, HIGH);
      delay(250);
      digitalWrite(LED5, LOW);
      digitalWrite(LED6, HIGH);
      delay(250);
      digitalWrite(LED6, LOW);
    } else if (s2state == 1) {
      // scroll left
      digitalWrite(LED6, HIGH);
      delay(250);
      digitalWrite(LED6, LOW);
      digitalWrite(LED5, HIGH);
      delay(250);
      digitalWrite(LED5, LOW);
      digitalWrite(LED4, HIGH);
      delay(250);
      digitalWrite(LED4, LOW);
      digitalWrite(LED3, HIGH);
      delay(250);
      digitalWrite(LED3, LOW);
      digitalWrite(LED2, HIGH);
      delay(250);
      digitalWrite(LED2, LOW);
      digitalWrite(LED1, HIGH);
      delay(250);
      digitalWrite(LED1, LOW);
    } else if (s3state == 1) {
      // scroll in
      digitalWrite(LED1, HIGH);
      digitalWrite(LED6, HIGH);
      delay(250);
      digitalWrite(LED1, LOW);
      digitalWrite(LED6, LOW);
      digitalWrite(LED2, HIGH);
      digitalWrite(LED5, HIGH);
      delay(250);
      digitalWrite(LED2, LOW);
      digitalWrite(LED5, LOW);
      digitalWrite(LED3, HIGH);
      digitalWrite(LED4, HIGH);
      delay(250);
      digitalWrite(LED3, LOW);
      digitalWrite(LED4, LOW);
    } else if (s4state == 1) {
      // scroll out
      digitalWrite(LED3, HIGH);
      digitalWrite(LED4, HIGH);
      delay(250);
      digitalWrite(LED3, LOW);
      digitalWrite(LED4, LOW);
      digitalWrite(LED2, HIGH);
      digitalWrite(LED5, HIGH);
      delay(250);
      digitalWrite(LED2, LOW);
      digitalWrite(LED5, LOW);
      digitalWrite(LED1, HIGH);
      digitalWrite(LED6, HIGH);
      delay(250);
      digitalWrite(LED1, LOW);
      digitalWrite(LED6, LOW);
    } else if (s5state == 1) {
      // scroll back and forth
      digitalWrite(LED1, HIGH);
      delay(250);
      digitalWrite(LED1, LOW);
      digitalWrite(LED2, HIGH);
      delay(250);
      digitalWrite(LED2, LOW);
      digitalWrite(LED3, HIGH);
      delay(250);
      digitalWrite(LED3, LOW);
      digitalWrite(LED4, HIGH);
      delay(250);
      digitalWrite(LED4, LOW);
      digitalWrite(LED5, HIGH);
      delay(250);
      digitalWrite(LED5, LOW);
      digitalWrite(LED6, HIGH);
      delay(250);
      digitalWrite(LED6, LOW);
      digitalWrite(LED5, HIGH);
      delay(250);
      digitalWrite(LED5, LOW);
      digitalWrite(LED4, HIGH);
      delay(250);
      digitalWrite(LED4, LOW);
      digitalWrite(LED3, HIGH);
      delay(250);
      digitalWrite(LED3, LOW);
      digitalWrite(LED2, HIGH);
      delay(250);
      digitalWrite(LED2, LOW);
    } else if (s6state == 1) {
      // random
      randomSeed(analogRead(3));
      onoroff = random(0, 2);
      millisecs = random(0, 301);
      digitalWrite(LED1, onoroff);
      delay(millisecs);
      randomSeed(analogRead(3));
      onoroff = random(0, 2);
      millisecs = random(0, 301);
      digitalWrite(LED2, onoroff);
      delay(millisecs);
      randomSeed(analogRead(3));
      onoroff = random(0, 2);
      millisecs = random(0, 301);
      digitalWrite(LED3, onoroff);
      delay(millisecs);
      randomSeed(analogRead(3));
      onoroff = random(0, 2);
      millisecs = random(0, 301);
      digitalWrite(LED4, onoroff);
      delay(millisecs);
      randomSeed(analogRead(3));
      onoroff = random(0, 2);
      millisecs = random(0, 301);
      digitalWrite(LED5, onoroff);
      delay(millisecs);
      randomSeed(analogRead(3));
      onoroff = random(0, 2);
      millisecs = random(0, 301);
      digitalWrite(LED6, onoroff);
      delay(millisecs);
    } else {
      // default: off
      digitalWrite(LED1, LOW);
      digitalWrite(LED2, LOW);
      digitalWrite(LED3, LOW);
      digitalWrite(LED4, LOW);
      digitalWrite(LED5, LOW);
      digitalWrite(LED6, LOW);
    }
  }</pre>
</div>
<p>&nbsp;</p>
<p>And here’s the full &#8220;cleaned-up&#8221; version:</p>
<ul>
<li>Binary sketch size: 2826 bytes</li>
<li>Sketch length: 119 lines</li>
</ul>
<div style="width: 500px; height: 500px; overflow: auto; border: #cccccc 1px solid; padding: 5px;">
<pre>  // www.TheElectronicsHobbyist.com/blog
  // Natalia Fargasch Norman
  // LED control via DIP switches

  // Arduino pins used for the LEDs
  // LED1 13
  // LED2 12
  // LED3 11
  // LED4 10
  // LED5 9
  // LED6 8

  // Arduino pins used for the switches
  // S1 7
  // S2 6
  // S3 5
  // S4 4
  // S5 3
  // S6 2

  // State of each switch (0 or 1)
  int state[6];

  // Random values for LED state and delay
  long onoroff;
  long millisecs;

  // loop counters
  int i, j;

  // delay
  int d = 250;

  void setup() {
    // pins for LEDs are outputs
    // LEDs 1-6 on pins 13-8
    for (i = 13; i &gt;= 8; i--) {
      pinMode(i, OUTPUT);
    }
    // pins for switches are inputs
    // switches 1-6 on pins 7-2
    for (i = 7; i &gt;= 2; i--) {
      pinMode(i, INPUT);
    }
  }

  void loop() {
    for (i = 0, j = 7; i &lt; 6, j &gt;= 2; i++, j--) {
      state[i] = digitalRead(j);
    }

    if (state[0]) {
      // scroll right
      for (i = 13; i &gt;= 8; i--) {
        digitalWrite(i, HIGH);
        delay(d);
        digitalWrite(i, LOW);
      }

    } else if (state[1]) {
      // scroll left
      for (i = 8; i &lt;= 13; i++) {
         digitalWrite(i, HIGH);
         delay(d);
         digitalWrite(i, LOW);
       }

   } else if (state[2]) {
       // scroll in
       // light up LEDs on pins i and 8+(13-i)
       for (i = 13; i &gt;= 11; i--) {
        digitalWrite(i, HIGH);
        digitalWrite(21 - i, HIGH);
        delay(d);
        digitalWrite(i, LOW);
        digitalWrite(21 - i, LOW);
      }

    } else if (state[3]) {
      // scroll out
      // light up LEDs on pins i and 8+(13-i)
      for (i = 11; i &lt;= 13; i++) {
         digitalWrite(i, HIGH);
         digitalWrite(21 - i, HIGH);
         delay(d);
         digitalWrite(i, LOW);
         digitalWrite(21 - i, LOW);
       }

    } else if (state[4]) {
       // scroll back and forth
       for (i = 13; i &gt;= 8; i--) {
        digitalWrite(i, HIGH);
        delay(d);
        digitalWrite(i, LOW);
      }
      for (i = 9; i &lt;= 12; i++) {
        digitalWrite(i, HIGH);
        delay(d);
        digitalWrite(i, LOW);
      }

    } else if (state[5]) {
       // random
       for (i = 13; i &gt;= 8; i--) {
        randomSeed(analogRead(i - 8));
        onoroff = random(0, 2);
        millisecs = random(0, 301);
        digitalWrite(i, onoroff);
        delay(millisecs);
      }      

    } else {
      // default: off
      for (i = 13; i &gt;= 8; i--) {
        digitalWrite(i, LOW);
      }
    }
  }</pre>
</div>
<p>Check out the <a href="http://www.youtube.com/watch?v=fHVdCT-iZwk" target="_blank">video</a> of this sketch in action.</p>
<p>You might also enjoy:<ol>
<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>
<li><a href='http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-3-of-4/' rel='bookmark' title='Controlling a Seven-Segment Display Using Arduino Part 3'>Controlling a Seven-Segment Display Using Arduino Part 3</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-2-digit-7-segment-display-with-buttons/' rel='bookmark' title='Arduino 2-Digit 7-Segment Display with Buttons | Part 4'>Arduino 2-Digit 7-Segment Display with Buttons | Part 4</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-2-of-4/' rel='bookmark' title='Controlling a Seven-Segment Display Using Arduino Part 2'>Controlling a Seven-Segment Display Using Arduino Part 2</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/led-patterns-using-dip-switch-and-arduino/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lumex Graphic LCD Road Test</title>
		<link>http://www.theelectronicshobbyist.com/blog/lumex-graphic-lcd-road-test/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/lumex-graphic-lcd-road-test/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 12:51:24 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Review]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[graphic LCD]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=508</guid>
		<description><![CDATA[This is a review of the Lumex LCR-U12864GSF-WH which was recently sent to me by Newark as part of their Product Road Testing program. The Lumex LCR-U12864GSF-WH is a graphic LCD display (pardon the redundancy) with white backlighting and screen measuring 128 pixels in width and 64 pixels in height. It uses the standard KS0108 [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/08/game-over.jpg"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class=" wp-image-511 alignleft" title="game-over" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/08/game-over-300x300.jpg" alt="Lumex GLCD" width="208" height="208" /></a>This is a review of the <a href="http://www.newark.com/lumex/lcr-u12864gsf-wh/display-lcd-graphic-128-x-64-dots/dp/65R6893" target="_blank">Lumex LCR-U12864GSF-WH</a> which was recently sent to me by <a href="http://www.newark.com" target="_blank">Newark</a> as part of their Product Road Testing program.</p>
<p>The Lumex LCR-U12864GSF-WH is a <a href="http://www.newark.com/graphic" target="_blank">graphic LCD display</a> (pardon the redundancy) with white backlighting and screen measuring 128 pixels in width and 64 pixels in height. It uses the standard KS0108 chip by Samsung, and a well documented <a href="http://code.google.com/p/glcd-arduino/downloads/list" target="_blank">Arduino library</a> is available for download.</p>
<p>The viewing area is 38.8mm x 70mm (1.5&#8243; x 2.75&#8243;) and the entire display fits the palm of your hand.<span id="more-508"></span></p>
<p>Here&#8217;s the top view:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/08/top.jpg"><img class="size-medium wp-image-509 alignnone" title="top" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/08/top-300x200.jpg" alt="Lumex GLCD top view" width="300" height="200" /></a></p>
<p>And here&#8217;s the bottom view:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/08/bottom.jpg"><img class="alignnone size-medium wp-image-510" title="bottom" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/08/bottom-300x217.jpg" alt="Lumex GLCD bottom view" width="300" height="217" /></a></p>
<p>To use it you have to solder headers to the LCD first; you can use male headers (great for using the display on a <a href="http://www.theelectronicshobbyist.com/blog/goto/breadboard" style="" target="_blank" rel="nofollow" onmouseover="self.status='http://www.theelectronicshobbyist.com/blog/goto/breadboard';return true;" onmouseout="self.status=''">breadboard</a>) or you can use female headers, if you just intend to connect the jumpers directly to it. You still will need a <a href="http://www.theelectronicshobbyist.com/blog/goto/breadboard" target="_blank">breadboard</a> (easiest way) to keep your project organized &#8212; two power sources and a trimmer potentiometer are necessary &#8212; although the library documentation shows how you can make these connections using a small stripboard (recommended for permanent projects). I may use it this way in the future once I decide on a cool project to use it on.</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/08/rocket.jpg"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-medium wp-image-515" title="rocket" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/08/rocket-300x214.jpg" alt="Lumex LCD Rocket game" width="300" height="214" /></a>The Lumex LCR-U12864GSF-WH is a very good choice for a beginner as it has a <a href="http://code.google.com/p/glcd-arduino/downloads/list" target="_blank">well documented library for the Arduino</a>, and wiring of the unit is straightforward. You can use the information on the <a href="http://www.lumex.com/specs/LCR-U12864GSF-WH.pdf" target="_blank">datasheet</a>, but the library documentation offers an illustrated guide on how to wire the unit properly.</p>
<p>The logic can be powered by the <a href="http://www.theelectronicshobbyist.com/blog/goto/uno">Arduino board</a> (5V), but the LED backlight and heater are powered by a <a href="http://www.amazon.com/gp/product/B000CSQK5E/ref=as_li_ss_tl?ie=UTF8&amp;tag=mpu-proj-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000CSQK5E" target="_blank">bench top power supply</a> at 12V, with a current limiting resistor being used on the LED. Once you have a permanent setup you may use batteries to power your project.</p>
<p>Links:</p>
<ul>
<li><a href="http://www.newark.com" target="_blank">Newark.com</a> electronic component distributor</li>
<li><a href="http://www.newark.com/lumex/lcr-u12864gsf-wh/display-lcd-graphic-128-x-64-dots/dp/65R6893" target="_blank">Lumex LCR-U12864GSF-WH</a> page where you can purchase the display</li>
<li><a href="http://www.newark.com/graphic" target="_blank">Graphic LCD displays</a> page on Newark.com where you can see all graphic LCDs available for purchase</li>
</ul>
<p>Here is the connection diagram made with Fritzing:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/08/fritzing.jpg"><img class="alignnone size-full wp-image-512" title="fritzing" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/08/fritzing.jpg" alt="Fritzing diagram for GLCD" width="322" height="370" /></a></p>
<p>And a picture of the setup:</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/08/setup.jpg"><img class="alignnone size-full wp-image-514" title="setup" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/08/setup.jpg" alt="Lumex GLCD Arduino setup" width="346" height="259" /></a></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/lumex-graphic-lcd-road-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino Serial Display: Introducing the GLO-216 2&#215;16 Multifont Serial OLED Display</title>
		<link>http://www.theelectronicshobbyist.com/blog/arduino-serial-display-introducing-the-glo-216-2x16-multifont-serial-oled-display/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/arduino-serial-display-introducing-the-glo-216-2x16-multifont-serial-oled-display/#comments</comments>
		<pubDate>Tue, 31 May 2011 20:00:28 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[OLED]]></category>
		<category><![CDATA[OLED display]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=475</guid>
		<description><![CDATA[The GLO-216 2&#215;16 Multifont Serial OLED allows you to translate 9600bps serial data into bright, high-contrast text on a compact screen. This low cost, low power serial display comes in two font colors (yellow and green) and is made and sold by seetron.com, owned by Scott Edwards of Electronics Now and Nuts &#38; Volts fame. [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://seetron.com/glo216.html" target="_blank"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="size-medium wp-image-479 alignleft" title="imglo" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/05/imglo-300x225.jpg" alt="GLO216 Serial OLED Display" width="300" height="225" /></a>The <a href="http://seetron.com/glo216.html" target="_blank">GLO-216 2&#215;16 Multifont Serial OLED</a> allows you to translate 9600bps serial data into bright, high-contrast text on a compact screen. This low cost, low power serial display comes in two font colors (yellow and green) and is made and sold by <a href="http://seetron.com" target="_blank">seetron.com</a>, owned by Scott Edwards of Electronics Now and Nuts &amp; Volts fame.</p>
<p>Think of the <a href="http://seetron.com/glo216.html" target="_blank">GLO-216</a> as a &#8220;mini terminal&#8221; that displays text and custom characters and responds to control characters such as tabs, linefeeds, carriage returns, backspace, etc. It is compatible with RS-232, Stamps, PICs and Arduino; pretty much any serial out, really.</p>
<p>The display uses less than 50mA, so it can be connected straight to the Arduino&#8217;s power supply.<span id="more-475"></span></p>
<p>The GLO-216 can store startup text and custom characters in EEPROM and there are instructions to save and recall this information. The simple sketch created to test the display creates and saves a new heart shaped custom character, then displays it on the screen along with some text.</p>
<blockquote><p>Seetron.com has set up a special offer for theelectronicshobbyist.com/blog readers: you can <strong>save 20% off a GLO-216</strong> if you use promo code &#8220;<strong>HOBBYIST</strong>&#8221; upon check out. For more information and to purchase, see the <a href="http://seetron.com/glo216.html" target="_blank">GLO-216 product page</a>.</p></blockquote>
<p style="text-align: left;">Here&#8217;s the GLO-216G just out of the box:<br />
<a href="http://seetron.com/glo216.html" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-medium wp-image-480" title="glo216gfront" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/05/glo216gfront-300x225.jpg" alt="GLO216 OLED display front" width="300" height="225" /></a><br />
And here&#8217;s the view from the back, notice the small board that brings out the pins nicely to a 5-pin header and saves you some soldering work:<br />
<a href="http://seetron.com/glo216.html" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-medium wp-image-481" title="glo216gback" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/05/glo216gback-300x225.jpg" alt="GLO216 OLED display back" width="300" height="225" /></a><br />
This is what it looks like when you first power it on:<br />
<a href="http://seetron.com/glo216.html" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-medium wp-image-482" title="glo216gseetron" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/05/glo216gseetron-300x225.jpg" alt="GLO216 Serial OLED Display by seetron" width="300" height="225" /></a><br />
And here&#8217;s the result of running the sketch I included in this post, that defines and prints a custom character:<br />
<a href="http://seetron.com/glo216.html" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-medium wp-image-483" title="higlo" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/05/higlo-300x225.jpg" alt="GLO216 Serial OLED Display custom character" width="300" height="225" /></a></p>
<p>The sketch to drive the display uses the &#8220;newsoftserial&#8221; library, which can be found here: <a href="http://arduiniana.org/libraries/newsoftserial" target="_blank">http://arduiniana.org/libraries/newsoftserial</a></p>
<p>A few nice features of the newsoftserial library compared to the original softserial are more accurate timing, smaller code size, but best of all the ability to output &#8220;inverted&#8221; serial (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> documentation states that their serial output is not RS-232 compatible, but newsoftserial permits the <a href="http://www.theelectronicshobbyist.com/blog/goto/uno">Arduino</a> to output inverted serial).</p>
<p>Sketch:</p>
<div style="width: 550px; height: 500px; overflow: auto; padding: 5px; border: 1px solid #CCCCCC;">
<pre>// Test of the GLO-216G serial OLED display
// Natalia Fargasch Norman @ theelectronicshobbyist.com/blog

// GLO-216Y/G information: http://www.seetron.com/glo216.html
// Programming reference: http://seetron.com/glo216/glo216prog.html

#include &lt;SoftwareSerial.h&gt;
#include &lt;GLO216.h&gt;

#define rxPin 255
#define txPin 3
#define NULL 0x00

int inverted = 1;

SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin, inverted);

void setup() {
  pinMode(txPin, OUTPUT);
  digitalWrite(txPin, LOW);
  mySerial.begin(9600);
  delay(10);

  // clears the screen and select font size and style
  char instr1[] = {
    clearScreen(),
    defaultSize(),
    selectSize(), // tall
    selectSize(), // wide
    selectSize(), // big
    textStyle(),
    NULL
  };
  const char message[] = "Hi GLO!";
  mySerial.print(instr1);
  // print message according to prior instructions
  mySerial.print(message);

  // defines a new custom heart shaped character
  char instr2[] = {
    // escape sequence to receive new custom character
    escape(),'D','0',
    // heart pattern using tool at http://seetron.com/apps/app_cceditor.html
    0x80,0x8A,0x95,0x91,0x8A,0x84,0x80,0x80,
    NULL
  };
  // print character 0x80, the newly defined heart
  const char msg[] = {0x80, NULL};
  mySerial.print(instr2);
  // print message according to prior instructions
  mySerial.print(msg);

/*  delay(3000);

  char instr3[] = {
    clearScreen(),
    NULL
  };
  mySerial.print(instr3);*/
}

void loop() {
  // ...
}</pre>
</div>
<p>GLO216 functions:</p>
<div style="width: 550px; height: 500px; overflow: auto; padding: 5px; border: 1px solid #CCCCCC;">
<pre>// GLO-216G serial OLED display
// Natalia Fargasch Norman @ theelectronicshobbyist.com/blog

// GLO-216Y/G information: http://www.seetron.com/glo216.html
// Programming reference: http://seetron.com/glo216/glo216prog.html

/*
Parameters for setPosition and rightAlign instructions:
setPosition: position + 0x40
rightAlign: '0'-'7'
*/

/*
Parameters for escape instructions:
Define lower custom character: 'D', '0'-'7'
Define upper custom character: 'd', '0'-'7'
Recall saved text: 'E', '0'
Restore custom character set: 'e', '0'
Save text since last clearScreen: 'X', '0'
Store custom character set: 'x', '0'
*/

// Moves printing position to the first character of top line
char homeCursor() {
  return 0x01;
}

// Cycles the font size: normal -&gt; tall -&gt; wide -&gt; big -&gt; normal -&gt; ...
char selectSize() {
  return 0x02;
}

// Sets font size to default of small on two lines of 16 characters
char defaultSize() {
  return 0x03;
}

// Behaves like the backspace key
char backspace() {
  return 0x08;
}

// Moves printing position to the next multiple of 4 location
char tab() {
  return 0x09;
}

// Moves the printing position down a line
char linefeed() {
  return 0x0A;
}

// Moves the printing position up a line
char verticalTab() {
  return 0x0B;
}

// Clears the screen and moves printing position to 0
char clearScreen() {
  return 0x0C;
}

// Moves to the first printing position of the next line
char carriageReturn() {
  return 0x0D;
}

// Turns on the OLED driver circuitry when it has been previously turned off
char turnOn() {
  return 0x0E;
}

// Turns off the OLED driver circuitry to save power
char turnOff() {
  return 0x0F;
}

// Sets the printing position according to value of next byte
char setPosition() {
  return 0x10;
}

// Prints text at the righthand end of a field of defined size from 2-8
char rightAlign() {
  return 0x12;
}

// Sets seven segment style font for large characters
char sevenSeg() {
  return 0x13;
}

// Sets text style font for large characters
char textStyle() {
  return 0x14;
}

// Begin multi-part instruction
char escape() {
  return 0x1B;
}

// See http://seetron.com/glo216/bpigloupgg.html
char bpkInstr() {
  return 0xFE;
}</pre>
</div>
<p>Header file:</p>
<div style="width: 550px; height: 200px; overflow: auto; padding: 5px; border: 1px solid #CCCCCC;">
<pre>// GLO-216G serial OLED display
// Natalia Fargasch Norman @ theelectronicshobbyist.com/blog

// GLO-216Y/G information: http://www.seetron.com/glo216.html
// Programming reference: http://seetron.com/glo216/glo216prog.html

#ifndef GLO216_h
#define GLO216_h

// Moves printing position to the first character of top line
char homeCursor();

// Cycles the font size: normal -&gt; tall -&gt; wide -&gt; big -&gt; normal -&gt; ...
char selectSize();

// Sets font size to default of small on two lines of 16 characters
char defaultSize();

// Behaves like the backspace key
char backspace();

// Moves printing position to the next multiple of 4 location
char tab();

// Moves the printing position down a line
char linefeed();

// Moves the printing position up a line
char verticalTab();

// Clears the screen and moves printing position to 0
char clearScreen();

// Moves to the first printing position of the next line
char carriageReturn();

// Turns on the OLED driver circuitry when it has been previously turned off
char turnOn();

// Turns off the OLED driver circuitry to save power
char turnOff();

// Sets the printing position according to value of next byte
char setPosition();

// Prints text at the righthand end of a field of defined size from 2-8
char rightAlign();

// Sets seven segment style font for large characters
char sevenSeg();

// Sets text style font for large characters
char textStyle();

// Begin multi-part instruction
char escape();

// See http://seetron.com/glo216/bpigloupgg.html
char bpkInstr();

#endif</pre>
</div>
<p>Keywords file:</p>
<div style="width: 550px; height: 200px; overflow: auto; padding: 5px; border: 1px solid #CCCCCC;">
<pre>#######################################
# Syntax Coloring Map for GLO216
#######################################

#######################################
# Datatypes (KEYWORD1)
#######################################

GLO216	KEYWORD1

#######################################
# Methods and Functions (KEYWORD2)
#######################################

homeCursor	KEYWORD2
selectSize	KEYWORD2
defaultSize	KEYWORD2
backspace	KEYWORD2
tab	KEYWORD2
linefeed	KEYWORD2
verticalTab	KEYWORD2
clearScreen	KEYWORD2
carriageReturn	KEYWORD2
turnOn	KEYWORD2
turnOff	KEYWORD2
setPosition	KEYWORD2
rightAlign	KEYWORD2
sevenSeg	KEYWORD2
textStyle	KEYWORD2
escape	KEYWORD2
bpkInstr	KEYWORD2

#######################################
# Constants (LITERAL1)
#######################################</pre>
</div>
<p>Download these four files in an archive here: <a href="http://www.theelectronicshobbyist.com/docs/GLO216.zip" target="_blank">GLO216.zip</a></p>
<p>You might also enjoy:<ol>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-serial-communication/' rel='bookmark' title='Arduino Serial Communication'>Arduino Serial Communication</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/led-patterns-using-dip-switch-and-arduino/' rel='bookmark' title='LED Patterns Using DIP Switch and Arduino'>LED Patterns Using DIP Switch and Arduino</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-3-of-4/' rel='bookmark' title='Controlling a Seven-Segment Display Using Arduino Part 3'>Controlling a Seven-Segment Display Using Arduino Part 3</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-2-of-4/' rel='bookmark' title='Controlling a Seven-Segment Display Using Arduino Part 2'>Controlling a Seven-Segment Display Using Arduino Part 2</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/arduino-serial-display-introducing-the-glo-216-2x16-multifont-serial-oled-display/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EEWeb Electronics Forum Shout Out</title>
		<link>http://www.theelectronicshobbyist.com/blog/eeweb-electronics-forum-shout-out/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/eeweb-electronics-forum-shout-out/#comments</comments>
		<pubDate>Mon, 23 May 2011 20:20:51 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[electronics forum]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=486</guid>
		<description><![CDATA[As a computer scientist turned electronics hobbyist trying to fill the gaps in my knowledge of electronics I find myself visiting the electronics forums over at EEWeb quite a lot these days. They are a community of EEs eager to help others, sharing tons of online resources, news, projects and general electronics expertise. Whether you [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.eeweb.com/"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="alignleft" title="EEWeb" src="http://www.eeweb.com/pics/site/electrical-engineering.png" alt="EEWeb" width="215" height="69" /></a>As a computer scientist turned electronics hobbyist trying to fill the gaps in my knowledge of electronics I find myself visiting the <a href="http://www.eeweb.com/electronics-forum/" target="_blank">electronics forums over at EEWeb</a> quite a lot these days. They are a community of EEs eager to help others, sharing tons of online resources, news, projects and general electronics expertise. Whether you don&#8217;t know what a <a href="http://www.eeweb.com/electronics-forum/microcontroller/" target="_blank">microcontroller</a> is, or are <a href="http://www.eeweb.com/electronics-forum/i-want-to-buy-a-used-oscilloscope-from-ebay-for-personal-use-suggestions/" target="_blank">looking for an affordable used oscilloscope on eBay</a>, you are sure to benefit from the information on their forums. Ready for a break? Check out their <a href="http://www.eeweb.com/rtz" target="_blank">comic strip</a>.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/eeweb-electronics-forum-shout-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The 2011 Workbench Challenge</title>
		<link>http://www.theelectronicshobbyist.com/blog/the-2011-workbench-challenge/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/the-2011-workbench-challenge/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 05:00:50 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Workbench]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[electronics hobby]]></category>
		<category><![CDATA[workbench]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=462</guid>
		<description><![CDATA[Since I started playing with hobby electronics I&#8217;ve been making do with somewhat of a makeshift workbench, which consists of some space of my desk combined with a tray table that I stole from my husband. The table is small and wobbly. The space on the desk is not permanent, so I have to put [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Since I started playing with hobby electronics I&#8217;ve been making do with somewhat of a makeshift workbench, which consists of some space of my desk combined with a tray table that I stole from my husband. The table is small and wobbly. The space on the desk is not permanent, so I have to put things away when I&#8217;m done working with them, and take them out again when I&#8217;m ready to work. I need easier access to my parts: some are stored in plastic bins that sit on a bookshelf, some are scattered throughout the room.</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/04/table.jpg"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="size-medium wp-image-463 alignleft" title="table" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/04/table-300x225.jpg" alt="Makeshift workbench" width="300" height="225" /></a>My goal for 2011 is to create a decent dedicated working area, a workbench of sorts where I can leave my unfinished projects even when I&#8217;m not actively working on them. In order to do that I need to buy a long narrow table that will serve as the workbench. The problem is that the space where I envision the table to go is currently occupied by a shelf with tons on books and other junk. The plan is to get rid of the books and the junk, get rid of the shelf, and clear the area around it to accommodate the table.<span id="more-462"></span></p>
<p>I&#8217;ve started getting rid of the books: I&#8217;ve bought a Kindle to be my new library and donated a few bags full to the local library. There are still quite a few books left, and a lot of junk. It is April already and I seem to be a long way to go until I can make room for the bench and storage area.</p>
<p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/04/storage.jpg"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-medium wp-image-464" title="storage" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2011/04/storage-225x300.jpg" alt="Storage shelf" width="225" height="300" /></a>So I thought maybe if I post pictures here and make my goal public, I&#8217;ll feel compelled to take action on it and actually get this accomplished before the end of the year. The pictures on this post are of the wobbly table and desk area currently used as workbench and the book shelf that serves as storage. There are plastic bins with parts all over the room, and the goal is to consolidate everything in one area for easy access to everything I need when I&#8217;m working.</p>
<p>I would like to have the table, some shelves (those that attach to the wall) and room for the plastic bins, as well as easy access to my tools and parts.</p>
<p>I will post updates when I make any sort of progress toward my goal. Ha! Maybe when I&#8217;m done I&#8217;ll submit my all new and improved workbench to The Amp Hour&#8217;s Workbench of the Week!</p>
<p>You might also enjoy:<ol>
<li><a href='http://www.theelectronicshobbyist.com/blog/workbench-challenge-update/' rel='bookmark' title='Workbench Challenge Update'>Workbench Challenge Update</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/the-2011-workbench-challenge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LED Bar Graph: Testing the Ardweeny</title>
		<link>http://www.theelectronicshobbyist.com/blog/led-bar-graph-testing-the-ardweeny/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/led-bar-graph-testing-the-ardweeny/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 01:00:25 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Arduino Clone]]></category>
		<category><![CDATA[Kit]]></category>
		<category><![CDATA[Ardweeny]]></category>
		<category><![CDATA[circuit]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[kit]]></category>
		<category><![CDATA[LED bar graph]]></category>
		<category><![CDATA[schematic]]></category>
		<category><![CDATA[sketch]]></category>
		<category><![CDATA[soldering]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=409</guid>
		<description><![CDATA[A while ago I purchased an Ardweeny kit, but hadn&#8217;t put it together and tested it until now. The Ardweeny is a small, breadboard friendly Arduino clone. In fact, it is the smallest Arduino clone that I know of, and the tiny board is backpacked on top of the ATMega chip. Here are the parts [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>A while ago I purchased an <a href="http://www.theelectronicshobbyist.com/blog/goto/ardweeny">Ardweeny kit</a>, but hadn&#8217;t put it together and tested it until now. The <a href="http://www.theelectronicshobbyist.com/blog/goto/ardweeny" style="" target="_blank" rel="nofollow" onmouseover="self.status='http://www.theelectronicshobbyist.com/blog/goto/ardweeny';return true;" onmouseout="self.status=''">Ardweeny</a> is a small, <a href="http://www.theelectronicshobbyist.com/blog/goto/breadboard" style="" target="_blank" rel="nofollow" onmouseover="self.status='http://www.theelectronicshobbyist.com/blog/goto/breadboard';return true;" onmouseout="self.status=''">breadboard</a> friendly <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> clone. In fact, it is the smallest Arduino clone that I know of, and the tiny board is backpacked on top of the ATMega chip.<br />
<a href="http://www.theelectronicshobbyist.com/blog/goto/ardweeny" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="size-medium wp-image-410 aligncenter" title="ardweeny" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/11/ardweeny-300x196.jpg" alt="Ardweeny" width="300" height="196" /></a><br />
Here are the parts laid out before I put the Ardweeny together: PCB, ATMega, headers and 7 parts. <em>Tip: double check that you received the correct parts; I received a 470K Ohm resistor (yellow-violet-yellow) instead of a 470 Ohm (yellow-violet-brown) one.</em><br />
<span id="more-409"></span><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/11/ardweeny-parts.jpg"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-medium wp-image-430" title="ardweeny-parts" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/11/ardweeny-parts-300x200.jpg" alt="Ardweeny parts" width="300" height="200" /></a><br />
The assembly manual that comes with the Ardweeny is illustrated in color, and explains how to put it together in great detail, step-by-step. It is a very easy kit to put together, perfect for a beginner. There isn&#8217;t a lot of soldering involved, either. (There are only 7 parts after all!)<br />
<a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/11/ardweeny-manual.jpg"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-medium wp-image-431" title="ardweeny-manual" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/11/ardweeny-manual-300x234.jpg" alt="Ardweeny manual" width="300" height="234" /></a><br />
Here is the final product, assembled and ready to go! Isn&#8217;t it tiny? The <a href="http://www.theelectronicshobbyist.com/blog/goto/ardweeny">Ardweeny</a> comes preloaded with the &#8220;Blink&#8221; sketch. In order to program it you will need an <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4414&amp;affiliate_banner_id=1" target="_blank">FTDI breakout board</a> and <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4191&amp;affiliate_banner_id=1" target="_blank">USB miniB cable</a>. Upon hooking it up for the first time the green LED should blink.<br />
<a href="http://www.theelectronicshobbyist.com/blog/goto/ardweeny" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-medium wp-image-432" title="ardweeny-finished" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/11/ardweeny-finished-300x261.jpg" alt="Ardweeny" width="300" height="261" /></a><br />
To test it I put together a simple circuit connecting a LED bar graph display and a variable resistor to the Ardweeny. Turning the dial on the trimpot lights the LEDs on the bar graph display accordingly. Here&#8217;s the setup:<br />
<a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/11/ardweeny-led-bar.jpg"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-medium wp-image-433" title="ardweeny-led-bar" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/11/ardweeny-led-bar-300x243.jpg" alt="Ardweeny LED bar graph project" width="300" height="243" /></a><br />
Here&#8217;s the schematic showing how the circuit was wired:<br />
<a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/11/ardweeny-schematic.jpg"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-medium wp-image-435" title="ardweeny-schematic" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/11/ardweeny-schematic-258x300.jpg" alt="Ardweeny LED bar graph schematic" width="258" height="300" /></a><br />
Here&#8217;s a quick <a href="http://www.youtube.com/watch?v=u2ZY6b3FGxg" target="_blank">video</a> of the Ardweeny in action.</p>
<p>And here&#8217;s the sketch:</p>
<pre>// www.TheElectronicsHobbyist.com/blog
// Natalia Fargasch Norman
// Trimpot display using LED bar graph

// loop variables and trimpot reading
int i, j, val;

void setup() {
  for (i = 0; i &lt; 10; i++) {
    pinMode(i, OUTPUT);
  }
}

void loop() {
  for (i = 0; i &lt; 10; i++) {
    digitalWrite(i, HIGH);
  }
  // trimpot connected to analog pin 0
  val = analogRead(0);
  // analogRead returns number
  // between 0 and 1023, scaling
  // for the 10 LEDs in the bar graph
  j = val / 100;
  for (i = 0; i &lt; j; i++) {
    // LED bar graph is common anode, LOW is on
    digitalWrite(i, LOW);
  }
}</pre>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/led-bar-graph-testing-the-ardweeny/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Pull Up Resistors</title>
		<link>http://www.theelectronicshobbyist.com/blog/pull-up-resistors/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/pull-up-resistors/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 05:00:37 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[circuit]]></category>
		<category><![CDATA[pull up resistor]]></category>
		<category><![CDATA[resistor]]></category>
		<category><![CDATA[schematic]]></category>
		<category><![CDATA[switch]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=361</guid>
		<description><![CDATA[If you&#8217;ve read Getting Started with Arduino (click on link to read my review of the book) you must have noticed that the circuit on page 43 uses a 10K Ohm resistor in series with the pushbutton. (If you haven&#8217;t read it yet, the example in the schematic on the right is similar to the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/09/pullup.jpg"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-medium wp-image-362" title="pullup" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/09/pullup-185x300.jpg" alt="Pull up resistors" width="250" /></a>If you&#8217;ve read <a href="http://www.theelectronicshobbyist.com/book/arduino-book.shtml" target="_blank">Getting Started with Arduino</a> (click on link to read my review of the book) you must have noticed that the circuit on page 43 uses a 10K Ohm resistor in series with the pushbutton. (If you haven&#8217;t read it yet, the example in the schematic on the right is similar to the setup featured on the book).</p>
<p>Consider a microcontroller with a digital input pin connected to a switch. When the switch is closed, the pin is connected to GND. When the switch is open, the signal is not connected to anything and is left at an unknown state. The signal is in this case said to be &#8220;floating&#8221;. This is pictured in circuit (1).</p>
<p>To remedy this problem we pull the signal up to VCC, as shown in circuit (2). Now when the switch is open the signal is connected directly to VCC and is at a known state. But notice that when the switch is closed, VCC and GND are connected, creating a short.<br />
<span id="more-361"></span><br />
To prevent the short we place a resistor between the input pin and VCC, as shown in circuit (3). This resistor is called a &#8220;pull up&#8221; resistor.</p>
<p>Pull down resistors work almost in the same way, except the circuit is connected so that when the switch is closed the input pin is connected to VCC, and when switch is open the pin is connected to GND using a &#8220;pull down&#8221; resistor, as shown in circuit (4).</p>
<p>A common value for pull up resistors is 10K Ohm. Higher resistance may be necessary for circuits that sink greater currents. We can use Ohm&#8217;s Law to determine the appropriate value for the resistor.</p>
<p>You might also enjoy:<ol>
<li><a href='http://www.theelectronicshobbyist.com/blog/basic-hobby-electronics-vocabulary-part-3-of-4-i-r/' rel='bookmark' title='Basic Hobby Electronics Vocabulary Part 3 of 4 (I-R)'>Basic Hobby Electronics Vocabulary Part 3 of 4 (I-R)</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-led-control-using-dip-switch-schematic/' rel='bookmark' title='Arduino LED Control Using DIP Switch: Schematic | Part 2'>Arduino LED Control Using DIP Switch: Schematic | Part 2</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/pull-up-resistors/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Arduino LED Control Using DIP Switch: Schematic &#124; Part 2</title>
		<link>http://www.theelectronicshobbyist.com/blog/arduino-led-control-using-dip-switch-schematic/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/arduino-led-control-using-dip-switch-schematic/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 09:40:46 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[DIP switch]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[schematic]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=369</guid>
		<description><![CDATA[This is an addendum to the LED control using DIP switch post, to include the schematic to the project circuit: You might also enjoy: Arduino LED Control Using DIP Switch &#124; Part 1 LED Patterns Using DIP Switch and Arduino Pull Up Resistors Arduino Motor Control for the Spinning Night Light &#124; Part 3]]></description>
			<content:encoded><![CDATA[<p></p><p>This is an addendum to the <a href="http://www.theelectronicshobbyist.com/blog/2010/09/arduino-led-control-using-dip-switch/" target="_self">LED control using DIP switch post</a>, to include the schematic to the project circuit:<br />
<a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/09/dipleds-schematic.jpg"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-medium wp-image-370" title="dipleds-schematic" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/09/dipleds-schematic-300x298.jpg" alt="Arduino LED control using DIP switch schematic" width="300" height="298" /></a></p>
<p>You might also enjoy:<ol>
<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>
<li><a href='http://www.theelectronicshobbyist.com/blog/led-patterns-using-dip-switch-and-arduino/' rel='bookmark' title='LED Patterns Using DIP Switch and Arduino'>LED Patterns Using DIP Switch and Arduino</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/pull-up-resistors/' rel='bookmark' title='Pull Up Resistors'>Pull Up Resistors</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>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/arduino-led-control-using-dip-switch-schematic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino LED Control Using DIP Switch &#124; Part 1</title>
		<link>http://www.theelectronicshobbyist.com/blog/arduino-led-control-using-dip-switch/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/arduino-led-control-using-dip-switch/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 05:00:48 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[DIP switch]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[pins]]></category>
		<category><![CDATA[serial communication]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=356</guid>
		<description><![CDATA[This is a very simple project that controls a set of LEDs using a DIP switch. The purpose of the sketch is to show the use of some Arduino serial communication functions, and to increase familiarity interfacing with digital I/O pins. Two LEDs were connected to the RX and TX pins on the Arduino (digital [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/09/dipleds.jpg"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-medium wp-image-357" title="dipleds" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/09/dipleds-234x300.jpg" alt="LED control using DIP switch" width="234" height="300" /></a>This is a very simple project that controls a set of LEDs using a DIP switch. The purpose of the sketch is to show the use of some <a href="http://www.theelectronicshobbyist.com/blog/2010/08/arduino-serial-communication/" target="_self">Arduino serial communication</a> functions, and to increase familiarity interfacing with digital I/O pins.</p>
<p>Two LEDs were connected to the RX and TX pins on the Arduino (digital pins 0 and 1), but remember to disconnect these pins while the sketch is being uploaded.</p>
<p>Parts list:</p>
<ul>
<li><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4221&amp;affiliate_banner_id=1" target="_blank">Arduino Duemilanove</a></li>
<li><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4304&amp;affiliate_banner_id=1" target="_blank">Breadboard</a></li>
<li>8 <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4215&amp;affiliate_banner_id=1" target="_blank">LEDs</a>, assorted colors</li>
<li><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4242&amp;affiliate_banner_id=1" target="_blank">Jumper wire, assorted lengths</a></li>
<li><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4318&amp;affiliate_banner_id=1" target="_blank">DIP switch</a></li>
<li>6 <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4383&amp;affiliate_banner_id=1" target="_blank">10K Ohm resistors</a> (pull up)</li>
<li>8 <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4373&amp;affiliate_banner_id=1" target="_blank">100 Ohm resistors</a> (current limiting)</li>
</ul>
<p><span id="more-356"></span></p>
<p>Sketch:</p>
<pre>// www.TheElectronicsHobbyist.com/blog
// Natalia Fargasch Norman
// LED control via DIP switches

// Arduino pins used for the LEDs
#define LED1 13
#define LED2 12
#define LED3 11
#define LED4 10
#define LED5 9
#define LED6 8

// <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> pins used for the switches
#define S1 7
#define S2 6
#define S3 5
#define S4 4
#define S5 3
#define S6 2

// State of each switch (0 or 1)
int s1state;
int s2state;
int s3state;
int s4state;
int s5state;
int s6state;

void setup() {
  // pins for LEDs are outputs
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
  pinMode(LED3, OUTPUT);
  pinMode(LED4, OUTPUT);
  pinMode(LED5, OUTPUT);
  pinMode(LED6, OUTPUT);
  // pins for switches are inputs
  pinMode(S1, INPUT);
  pinMode(S2, INPUT);
  pinMode(S3, INPUT);
  pinMode(S4, INPUT);
  pinMode(S5, INPUT);
  pinMode(S6, INPUT);
  // setup serial port
  Serial.begin(9600);
  Serial.println("Serial port open");
}

void loop() {
  s1state = digitalRead(S1);
  digitalWrite(LED1, s1state);
  s2state = digitalRead(S2);
  digitalWrite(LED2, s2state);
  s3state = digitalRead(S3);
  digitalWrite(LED3, s3state);
  s4state = digitalRead(S4);
  digitalWrite(LED4, s4state);
  s5state = digitalRead(S5);
  digitalWrite(LED5, s5state);
  s6state = digitalRead(S6);
  digitalWrite(LED6, s6state);
  Serial.print(s1state);
  Serial.print(s2state);
  Serial.print(s3state);
  Serial.print(s4state);
  Serial.print(s5state);
  Serial.print(s6state);
  Serial.println();
}</pre>
<p>A <a href="http://www.youtube.com/watch?v=SVVMeKMTtH8" target="_blank">video</a> of the project in action.</p>
<p>You might also enjoy:<ol>
<li><a href='http://www.theelectronicshobbyist.com/blog/led-patterns-using-dip-switch-and-arduino/' rel='bookmark' title='LED Patterns Using DIP Switch and Arduino'>LED Patterns Using DIP Switch and Arduino</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-3-of-4/' rel='bookmark' title='Controlling a Seven-Segment Display Using Arduino Part 3'>Controlling a Seven-Segment Display Using Arduino Part 3</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-4-of-4/' rel='bookmark' title='Controlling a Seven-Segment Display Using Arduino Part 4'>Controlling a Seven-Segment Display Using Arduino Part 4</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-2-digit-7-segment-display-with-buttons/' rel='bookmark' title='Arduino 2-Digit 7-Segment Display with Buttons | Part 4'>Arduino 2-Digit 7-Segment Display with Buttons | Part 4</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/arduino-led-control-using-dip-switch/feed/</wfw:commentRss>
		<slash:comments>3</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 20:32:30 -->
