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

<channel>
	<title>The Electronics Hobbyist &#187; LED</title>
	<atom:link href="http://www.theelectronicshobbyist.com/blog/tag/led/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>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>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>
		<item>
		<title>Arduino 2-Digit 7-Segment Display Counter &#124; Part 1</title>
		<link>http://www.theelectronicshobbyist.com/blog/arduino-2-digit-7-segment-display-counter/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/arduino-2-digit-7-segment-display-counter/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 05:00:28 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[7-segment display]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[sketch]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=185</guid>
		<description><![CDATA[This month&#8217;s Arduino project is to build two 2-digit 7-segment LED display circuits and sketches, one that counts up and one that counts up using mini push buttons. The next posts will explain the circuits and the Arduino sketches. (Here&#8217;s a simpler, 1-digit 7-segment display using Arduino). Materials: Arduino Duemilanove (or Uno) 1 2-digit 7-segment display [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/05/2-digit-display.jpg"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-medium wp-image-186" title="2-digit-display" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/05/2-digit-display-217x300.jpg" alt="2-digit 7-segment display" width="174" height="240" /></a>This month&#8217;s <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> project is to build two 2-digit 7-segment LED display circuits and sketches, one that counts up and one that counts up using mini push buttons. The next posts will explain the circuits and the Arduino sketches. (Here&#8217;s a simpler, <a href="http://www.theelectronicshobbyist.com/blog/2010/02/controlling-a-seven-segment-display-using-arduino-part-1-of-4/">1-digit 7-segment display using Arduino</a>).</p>
<p>Materials:</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> (or <a href="http://www.theelectronicshobbyist.com/blog/goto/uno">Uno</a>)</li>
<li>1 <a href="http://www.avantlink.com/click.php?tt=cl&amp;mi=10609&amp;pw=21273&amp;url=https%3A%2F%2Fwww.jameco.com%2Fwebapp%2Fwcs%2Fstores%2Fservlet%2FProduct_10001_10001_1955781_-1">2-digit 7-segment display<img style="border: none !important; margin: 0px !important;" src="http://www.avantlink.com/tpv/10609/0/17253/21273/-/cl/image.png" alt="" width="0" height="0" /></a> (I got a <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_18201_-1" target="_blank">50-piece LED display grab bag<img style="border: none !important; margin: 0px !important;" src="http://www.avantlink.com/tpv/10609/0/17253/21273/-/cl/image.png" alt="" width="0" height="0" /></a> for better value; the one I used was configured as shown)</li>
<li>2 <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4211&amp;affiliate_banner_id=1" target="_blank">Mini push button switches</a></li>
<li>9 <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4373&amp;affiliate_banner_id=1" target="_blank">Resistors, 100 Ohm</a></li>
<li>2 <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4383&amp;affiliate_banner_id=1" target="_blank">Resistors, 10K Ohm</a></li>
<li><a href="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/05/seven-segment-count.jpg"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-medium wp-image-187" title="seven-segment-count" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/05/seven-segment-count-300x225.jpg" alt="2-digit 7-segment display project on breadboard" width="300" height="225" /></a>2 <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_38375_-1">2N3906 transistors (PNP)<img style="border: none !important; margin: 0px !important;" src="http://www.avantlink.com/tpv/10609/0/17253/21273/-/cl/image.png" alt="" width="0" height="0" /></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_194299_-1">Solderless breadboard<img style="border: none !important; margin: 0px !important;" src="http://www.avantlink.com/tpv/10609/0/17253/21273/-/cl/image.png" alt="" width="0" height="0" /></a></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 Wires</a> in assorted lengths</li>
</ul>
<p>Sketch for counting up without buttons:<br />
<span id="more-185"></span></p>
<pre>// www.TheElectronicsHobbyist.com/blog
// Natalia Fargasch Norman
// Dual seven-segment LED Display
// Common Anode digit 1 pin 10
// Common Anode digit 2 pin 5

//       CA1 G  F  A  B
//        |  |  |  |  |      -&gt; pins and segments they control
//   ---------    ---------
//   |   A   |    |   A   |
//  F|       |B  F|       |B
//   |---G---|    |---G---|
//  E|       |C  E|       |C
//   |   D   |    |   D   |
//   ---------    ---------
//        |  |  |  |  |      -&gt; pins and segments they control
//        D  DP E  C CA2         

// Segments that make each number when lit:
// 0 =&gt; -FEDCBA
// 1 =&gt; ----BC-
// 2 =&gt; G-ED-BA
// 3 =&gt; G--DCBA
// 4 =&gt; GF--CB-
// 5 =&gt; GF-DC-A
// 6 =&gt; GFEDC-A
// 7 =&gt; ----CBA
// 8 =&gt; GFEDCBA
// 9 =&gt; GF-DCBA

// Arduino digital pins used to light up
// corresponding segments on the LED display
#define A 3
#define B 2
#define C 6
#define D 8
#define E 7
#define F 4
#define G 5

// Pins driving common anodes
#define CA1 13
#define CA2 12

// Pins for A B C D E F G, in sequence
const int segs[7] = { A, B, C, D, E, F, G };

// Segments that make each number
const byte numbers[10] = { 0b1000000, 0b1111001, 0b0100100, 0b0110000, 0b0011001, 0b0010010,
0b0000010, 0b1111000, 0b0000000, 0b0010000 };

void setup() {
  pinMode(A, OUTPUT);
  pinMode(B, OUTPUT);
  pinMode(C, OUTPUT);
  pinMode(D, OUTPUT);
  pinMode(E, OUTPUT);
  pinMode(F, OUTPUT);
  pinMode(G, OUTPUT);
  pinMode(CA1, OUTPUT);
  pinMode(CA2, OUTPUT);
}

void loop() {
  for (int digit1=0; digit1 &lt; 10; digit1++) {
    for (int digit2=0; digit2 &lt; 10; digit2++) {
      unsigned long startTime = millis();
      for (unsigned long elapsed=0; elapsed &lt; 600; elapsed = millis() - startTime) {
        lightDigit1(numbers[digit1]);
        delay(5);
        lightDigit2(numbers[digit2]);
        delay(5);
      }
    }
  }
}

void lightDigit1(byte number) {
  digitalWrite(CA1, LOW);
  digitalWrite(CA2, HIGH);
  lightSegments(number);
}

void lightDigit2(byte number) {
  digitalWrite(CA1, HIGH);
  digitalWrite(CA2, LOW);
  lightSegments(number);
}

void lightSegments(byte number) {
  for (int i = 0; i &lt; 7; i++) {
    int bit = bitRead(number, i);
    digitalWrite(segs[i], bit);
  }
}</pre>
<p>Here&#8217;s a video of the <a href="http://www.youtube.com/watch?v=bEE9ouaXEbU" target="_blank">2-digit 7-segment display counter in action</a>.</p>
<p>You might also enjoy:<ol>
<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-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-counter-sketch/' rel='bookmark' title='Arduino 2-Digit 7-Segment Display Counter: Sketch | Part 3'>Arduino 2-Digit 7-Segment Display Counter: Sketch | Part 3</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>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/arduino-2-digit-7-segment-display-counter/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Arduino Lilypad: an Account of Coolness in 4 Links</title>
		<link>http://www.theelectronicshobbyist.com/blog/arduino-lilypad-an-account-of-coolness-in-4-links/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/arduino-lilypad-an-account-of-coolness-in-4-links/#comments</comments>
		<pubDate>Tue, 11 May 2010 05:00:11 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[Lilypad]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=92</guid>
		<description><![CDATA[Jacket 1: a jacket with turn signals that lets people know where you&#8217;re headed when you&#8217;re on your bike: http://web.media.mit.edu/~leah/LilyPad/build/turn_signal_jacket.html Jacket 2: a jacket that both heats and cools based on one’s body temperature: http://www.instructables.com/id/How-to-make-a-Heating-and-Cooling-Jacket/ Shirt: this cool shirt features an RGB LED that changes color in response to motion and tilt: http://web.media.mit.edu/~leah/LilyPad/build/accelero_shirt.html Scarf: this [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4233&amp;affiliate_banner_id=1" target="_blank"><img class="alignright size-full wp-image-93" style="margin: 5px;;  float: right; padding: 4px; margin: 0 0 2px 7px;" title="arduino-lilypad" src="http://www.theelectronicshobbyist.com/blog/wp-content/uploads/2010/05/arduino-lilypad.jpg" alt="Arduino Lilypad" width="144" height="108" /></a></p>
<ol>
<li><strong>Jacket 1</strong>: a jacket with turn signals that lets people know where you&#8217;re headed when you&#8217;re on your bike: <a href="http://web.media.mit.edu/~leah/LilyPad/build/turn_signal_jacket.html" target="_blank">http://web.media.mit.edu/~leah/LilyPad/build/turn_signal_jacket.html</a></li>
<li><strong>Jacket 2</strong>: a jacket that both heats and cools based on one’s body temperature: <a href="http://www.instructables.com/id/How-to-make-a-Heating-and-Cooling-Jacket/" target="_blank">http://www.instructables.com/id/How-to-make-a-Heating-and-Cooling-Jacket/</a></li>
<li><strong>Shirt</strong>: this cool shirt features an RGB LED that changes color in response to motion and tilt: <a href="http://web.media.mit.edu/~leah/LilyPad/build/accelero_shirt.html" target="_blank">http://web.media.mit.edu/~leah/LilyPad/build/accelero_shirt.html</a></li>
<li><strong>Scarf</strong>: this is no ordinary scarf! The interactive passion sensing scarf detects the presence of another scarf wearer nearby and sets the color of an RGB LED to either blue (lonely) or red (passion): <a href="http://www.instructables.com/id/Arduino-Lilypad-Interactive-Passion-Sensing-Scarf/" target="_blank">http://www.instructables.com/id/Arduino-Lilypad-Interactive-Passion-Sensing-Scarf/</a></li>
</ol>
<p><strong><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4233&amp;affiliate_banner_id=1" target="_blank">Buy the LilyPad Arduino</a></strong></p>
<p>The Lilypad at the Official <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> website: <a href="http://www.arduino.cc/en/Main/ArduinoBoardLilyPad" target="_blank">http://www.arduino.cc/en/Main/ArduinoBoardLilyPad</a></p>
<p>You might also enjoy:<ol>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-mega-an-account-of-coolness-in-4-links/' rel='bookmark' title='Arduino Mega: an Account of Coolness in 4 Links'>Arduino Mega: an Account of Coolness in 4 Links</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-mini-an-account-of-coolness-in-4-links/' rel='bookmark' title='Arduino Mini: an Account of Coolness in 4 Links'>Arduino Mini: an Account of Coolness in 4 Links</a></li>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-nano-an-account-of-coolness-in-4-links/' rel='bookmark' title='Arduino Nano: an Account of Coolness in 4 Links'>Arduino Nano: an Account of Coolness in 4 Links</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/arduino-lilypad-an-account-of-coolness-in-4-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Controlling a Seven-Segment Display Using Arduino Part 4</title>
		<link>http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-4-of-4/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-4-of-4/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 07:00:19 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[7-segment display]]></category>
		<category><![CDATA[bits]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[pins]]></category>
		<category><![CDATA[sketch]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=21</guid>
		<description><![CDATA[The third and final Arduino sketch uses bits to represent each segment and is a reduced code version of the previous sketch (1,210 bytes for sketch #3 instead of 1,852 bytes for sketch #2). A ten element array holds a byte for each number 0-9 that specifies what segments should be lit (pin low). Bit [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>The third and final <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4221&amp;affiliate_banner_id=1" target="_blank">Arduino</a> sketch uses bits to represent each segment and is a reduced code version of the previous sketch (1,210 bytes for sketch #3 instead of 1,852 bytes for sketch #2). A ten element array holds a byte for each number 0-9 that specifies what segments should be lit (pin low). Bit 0 corresponds to segment A, bit 1 to segment B and so on. In order to display the number 1, segments B and C need to be lit, so that is represented by the value 0b1111001. Function &#8220;lightSegments&#8221; reads these bits in sequence and sets the corresponding segments accordingly.</p>
<p><span id="more-21"></span></p>
<p>Sketch #3:</p>
<pre>
// www.TheElectronicsHobbyist.com/blog
// Natalia Fargasch Norman
// Seven-segment LED Display
// Common Anode pins 3 and 8

//   G F + A B
//   | | | | |   -&gt; pins and segments they control
//   ---------
//  F|   A   |B
//   |---G---|   -&gt; segments
//  E|   D   |C
//   ---------
//   | | | | |   -&gt; pins and segments they control
//   E D + C DP

// Segments that make each number when lit:
// 0 =&gt; -FEDCBA
// 1 =&gt; ----BC-
// 2 =&gt; G-ED-BA
// 3 =&gt; G--DCBA
// 4 =&gt; GF--CB-
// 5 =&gt; GF-DC-A
// 6 =&gt; GFEDC-A
// 7 =&gt; ----CBA
// 8 =&gt; GFEDCBA
// 9 =&gt; GF-DCBA

// <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> digital pins used to light up
// corresponding segments on the LED display
#define A 2
#define B 3
#define C 4
#define D 5
#define E 6
#define F 7
#define G 8

// Pushbutton connected to pin 9
#define BUTTON 9

int count = 0; // current display count

const byte numbers[10] = { 0b1000000, 0b1111001, 0b0100100, 0b0110000, 0b0011001, 0b0010010,
0b0000010, 0b1111000, 0b0000000, 0b0010000 };

void setup() {
  pinMode(A, OUTPUT);
  pinMode(B, OUTPUT);
  pinMode(C, OUTPUT);
  pinMode(D, OUTPUT);
  pinMode(E, OUTPUT);
  pinMode(F, OUTPUT);
  pinMode(G, OUTPUT);
  pinMode(BUTTON, INPUT);
  lightSegments(0b1000000);
}

void loop() {
  int val = digitalRead(BUTTON);
  if (val == HIGH) {
    count++;
    if (count == 10) count = 0;
    delay(200);
    lightSegments(numbers[count]);
  }
}

void lightSegments(byte number) {
  for (int i = 0; i &lt; 7; i++) {
    int bit = bitRead(number, i);
    // segments connected to Arduino pins 2-8
    digitalWrite(i+2, bit);
  }
}</pre>
<p>Watch <a href="http://www.youtube.com/watch?v=oL84Wo9PNYs" target="_blank">a short video</a> of this project in action.</p>
<p>You might also enjoy:<ol>
<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/arduino-2-digit-7-segment-display-counter/' rel='bookmark' title='Arduino 2-Digit 7-Segment Display Counter | Part 1'>Arduino 2-Digit 7-Segment Display Counter | Part 1</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/controlling-a-seven-segment-display-using-arduino-part-4-of-4/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Controlling a Seven-Segment Display Using Arduino Part 3</title>
		<link>http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-3-of-4/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-3-of-4/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 07:00:01 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[7-segment display]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[pins]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=19</guid>
		<description><![CDATA[The second sketch cycles through the numbers from 0 to 9, but only increments the display counter each time a button is pressed. Note that this code includes simple debouncing by introducing a short delay when the Arduino detects that the button has been pressed. Sketch #2: // www.TheElectronicsHobbyist.com/blog // Natalia Fargasch Norman // Seven-segment [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="separator" style="clear: both; text-align: center;"><a style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;" href="http://www.theelectronicshobbyist.com/images/Seven-Segment.jpg"><img src="http://www.theelectronicshobbyist.com/images/Seven-Segment.jpg" border="0" alt="" width="162" height="200" /></a></div>
<p>The second sketch cycles through the numbers from 0 to 9, but only increments the display counter each time a button is pressed. Note that this code includes simple debouncing by introducing a short delay when the <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4221&amp;affiliate_banner_id=1" target="_blank">Arduino</a> detects that the button has been pressed.</p>
<p><span id="more-19"></span></p>
<p>Sketch #2:</p>
<pre>// www.TheElectronicsHobbyist.com/blog
// Natalia Fargasch Norman
// Seven-segment LED Display
// Common Anode pins 3 and 8

//   G F + A B
//   | | | | |   -&gt; pins and segments they control
//   ---------
//  F|   A   |B
//   |---G---|   -&gt; segments
//  E|   D   |C
//   ---------
//   | | | | |   -&gt; pins and segments they control
//   E D + C DP

// Segments that make each number when lit:
// 0 =&gt; ABCDEF
// 1 =&gt; BC
// 2 =&gt; ABDEG
// 3 =&gt; ABCDG
// 4 =&gt; BCFG
// 5 =&gt; ACDFG
// 6 =&gt; ACDEFG
// 7 =&gt; ABC
// 8 =&gt; ABCDEFG
// 9 =&gt; ABCDFG

// <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> digital pins used to light up
// corresponding segments on the LED display
#define A 2
#define B 3
#define C 4
#define D 5
#define E 6
#define F 7
#define G 8

// Pushbutton connected to pin 9
#define BUTTON 9

// Common anode;
// on when pin is low
// and off when pin is high
#define ON LOW
#define OFF HIGH

int count = 0; // current display count
int val = 0;   // digital input from button

void setup() {
  pinMode(A, OUTPUT);
  pinMode(B, OUTPUT);
  pinMode(C, OUTPUT);
  pinMode(D, OUTPUT);
  pinMode(E, OUTPUT);
  pinMode(F, OUTPUT);
  pinMode(G, OUTPUT);
  pinMode(BUTTON, INPUT);
  zero();
}

void loop() {
  val = digitalRead(BUTTON);
  if (val == HIGH) {
    count++;
    delay(200);
    switch (count) {
      case 0:
        zero();
        break;
      case 1:
        one();
        break;
      case 2:
        two();
        break;
      case 3:
        three();
        break;
      case 4:
        four();
        break;
      case 5:
        five();
        break;
      case 6:
        six();
        break;
      case 7:
        seven();
        break;
      case 8:
        eight();
        break;
      case 9: {
        nine();
        count = -1;
        break;
      }
    }
  }
}

// 0 =&gt; ABCDEF
void zero() {
  digitalWrite(A, ON);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, ON);
  digitalWrite(E, ON);
  digitalWrite(F, ON);
  digitalWrite(G, OFF);
}

// 1 =&gt; BC
void one() {
  digitalWrite(A, OFF);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, OFF);
  digitalWrite(E, OFF);
  digitalWrite(F, OFF);
  digitalWrite(G, OFF);
}

// 2 =&gt; ABDEG
void two() {
  digitalWrite(A, ON);
  digitalWrite(B, ON);
  digitalWrite(C, OFF);
  digitalWrite(D, ON);
  digitalWrite(E, ON);
  digitalWrite(F, OFF);
  digitalWrite(G, ON);
}

// 3 =&gt; ABCDG
void three() {
  digitalWrite(A, ON);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, ON);
  digitalWrite(E, OFF);
  digitalWrite(F, OFF);
  digitalWrite(G, ON);
}

// 4 =&gt; BCFG
void four() {
  digitalWrite(A, OFF);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, OFF);
  digitalWrite(E, OFF);
  digitalWrite(F, ON);
  digitalWrite(G, ON);
}

// 5 =&gt; ACDFG
void five() {
  digitalWrite(A, ON);
  digitalWrite(B, OFF);
  digitalWrite(C, ON);
  digitalWrite(D, ON);
  digitalWrite(E, OFF);
  digitalWrite(F, ON);
  digitalWrite(G, ON);
}

// 6 =&gt; ACDEFG
void six() {
  digitalWrite(A, ON);
  digitalWrite(B, OFF);
  digitalWrite(C, ON);
  digitalWrite(D, ON);
  digitalWrite(E, ON);
  digitalWrite(F, ON);
  digitalWrite(G, ON);
}

// 7 =&gt; ABC
void seven() {
  digitalWrite(A, ON);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, OFF);
  digitalWrite(E, OFF);
  digitalWrite(F, OFF);
  digitalWrite(G, OFF);
}

// 8 =&gt; ABCDEFG
void eight() {
  digitalWrite(A, ON);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, ON);
  digitalWrite(E, ON);
  digitalWrite(F, ON);
  digitalWrite(G, ON);
}

// 9 =&gt; ABCDFG
void nine() {
  digitalWrite(A, ON);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, ON);
  digitalWrite(E, OFF);
  digitalWrite(F, ON);
  digitalWrite(G, ON);
}</pre>
<p>You might also enjoy:<ol>
<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/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>
<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/arduino-2-digit-7-segment-display-counter/' rel='bookmark' title='Arduino 2-Digit 7-Segment Display Counter | Part 1'>Arduino 2-Digit 7-Segment Display Counter | Part 1</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-3-of-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Controlling a Seven-Segment Display Using Arduino Part 2</title>
		<link>http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-2-of-4/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-2-of-4/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 15:00:00 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[7-segment display]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[pins]]></category>
		<category><![CDATA[sketch]]></category>
		<category><![CDATA[supplies]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=17</guid>
		<description><![CDATA[This month&#8217;s project is a simple program to display the Arabic numbers using the Arduino and a 7-segment display. Parts list: Arduino Duemilanove 7-Segment Display(I got the grab bag, with 50 displaysfor $10.95) Breadboard Mini Push Button Switch Jumper Wire The 7-segment display used in this example is a common anode display with pin connections [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>This month&#8217;s project is a simple program to display the Arabic numbers using the <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4221&amp;affiliate_banner_id=1" target="_blank">Arduino</a> and a 7-segment display.</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.avantlink.com/click.php?tt=cl&amp;mi=10609&amp;pw=21273&amp;url=http%3A%2F%2Fwww.jameco.com%2Fwebapp%2Fwcs%2Fstores%2Fservlet%2FProductDisplay%3FlangId%3D-1%26storeId%3D10001%26catalogId%3D10001%26productId%3D1955790" target="_blank">7-Segment Display<img style="border: 0px;" src="http://www.avantlink.com/tpv/10609/0/17253/21273/-/cl/image.png" alt="" width="0" height="0" /></a>(I got the <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_18201_-1" target="_blank">grab bag, with 50 displays<img style="border: none !important; margin: 0px !important;" src="http://www.avantlink.com/tpv/10609/0/17253/21273/-/cl/image.png" alt="" width="0" height="0" /></a>for $10.95)</li>
<li><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%2FProductDisplay%3FlangId%3D-1%26storeId%3D10001%26catalogId%3D10001%26productId%3D20601" target="_blank">Breadboard<img style="border: 0px;" src="http://www.avantlink.com/tpv/10609/0/17253/21273/-/cl/image.png" alt="" width="0" height="0" /></a></li>
<li><a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4211&amp;affiliate_banner_id=1" target="_blank">Mini Push Button Switch</a></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</a></li>
</ul>
<p><span id="more-17"></span></p>
<div class="separator" style="clear: both; text-align: center;"><a style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;" href="http://www.theelectronicshobbyist.com/images/7segpins.jpg"><img src="http://www.theelectronicshobbyist.com/images/7segpins.jpg" border="0" alt="" /></a></div>
<p>The 7-segment display used in this example is a common anode display with pin connections as shown in the picture, and the <a href="http://www.cutedigi.com/product_info.php?ref=3&amp;products_id=4221&amp;affiliate_banner_id=1" target="_blank">Arduino</a> sketches were written so as to light up a segment when the corresponding pin is LOW.</p>
<p>The first of a series of three simple sketches cycles through the numbers from 0 to 9, resets the display to show a &#8220;0&#8243; once it reaches &#8220;9&#8243; and repeats until the power is turned off on the Arduino. The code below accomplishes this in a very simplified manner, as each digit is formed by a separate function that sequentially lights up each of the necessary segments to display that number.</p>
<p>The third sketch in this sequence will use individual bits to represent each segment and will require less written code, a good thing to keep in mind when programming microcontrollers, as they have a small memory footprint (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> <a href="http://www.theelectronicshobbyist.com/blog/goto/duemilanove" style="" target="_blank" rel="nofollow" onmouseover="self.status='http://www.theelectronicshobbyist.com/blog/goto/duemilanove';return true;" onmouseout="self.status=''">Duemilanove</a> has 32K bytes of program memory).</p>
<p>Sketch #1:</p>
<pre>
// www.TheElectronicsHobbyist.com/blog
// Natalia Fargasch Norman
// Seven-segment LED Display
// Common Anode pins 3 and 8

//   G F + A B
//   | | | | |   -&gt; pins and segments they control
//   ---------
//  F|   A   |B
//   |---G---|   -&gt; segments
//  E|   D   |C
//   ---------
//   | | | | |   -&gt; pins and segments they control
//   E D + C DP

// Segments that make each number when lit:
// 0 =&gt; ABCDEF
// 1 =&gt; BC
// 2 =&gt; ABDEG
// 3 =&gt; ABCDG
// 4 =&gt; BCFG
// 5 =&gt; ACDFG
// 6 =&gt; ACDEFG
// 7 =&gt; ABC
// 8 =&gt; ABCDEFG
// 9 =&gt; ABCDFG

// Arduino digital pins used to light up
// corresponding segments on the LED display
#define A 2
#define B 3
#define C 4
#define D 5
#define E 6
#define F 7
#define G 8

// Common anode;
// on when pin is low
// and off when pin is high
#define ON LOW
#define OFF HIGH

int ms = 1000;

void setup() {
  pinMode(A, OUTPUT);
  pinMode(B, OUTPUT);
  pinMode(C, OUTPUT);
  pinMode(D, OUTPUT);
  pinMode(E, OUTPUT);
  pinMode(F, OUTPUT);
  pinMode(G, OUTPUT);
}

void loop() {
  zero();
  one();
  two();
  three();
  four();
  five();
  six();
  seven();
  eight();
  nine();
}

// 0 =&gt; ABCDEF
void zero() {
  digitalWrite(A, ON);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, ON);
  digitalWrite(E, ON);
  digitalWrite(F, ON);
  digitalWrite(G, OFF);
  delay(ms);
}

// 1 =&gt; BC
void one() {
  digitalWrite(A, OFF);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, OFF);
  digitalWrite(E, OFF);
  digitalWrite(F, OFF);
  digitalWrite(G, OFF);
  delay(ms);
}

// 2 =&gt; ABDEG
void two() {
  digitalWrite(A, ON);
  digitalWrite(B, ON);
  digitalWrite(C, OFF);
  digitalWrite(D, ON);
  digitalWrite(E, ON);
  digitalWrite(F, OFF);
  digitalWrite(G, ON);
  delay(ms);
}

// 3 =&gt; ABCDG
void three() {
  digitalWrite(A, ON);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, ON);
  digitalWrite(E, OFF);
  digitalWrite(F, OFF);
  digitalWrite(G, ON);
  delay(ms);
}

// 4 =&gt; BCFG
void four() {
  digitalWrite(A, OFF);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, OFF);
  digitalWrite(E, OFF);
  digitalWrite(F, ON);
  digitalWrite(G, ON);
  delay(ms);
}

// 5 =&gt; ACDFG
void five() {
  digitalWrite(A, ON);
  digitalWrite(B, OFF);
  digitalWrite(C, ON);
  digitalWrite(D, ON);
  digitalWrite(E, OFF);
  digitalWrite(F, ON);
  digitalWrite(G, ON);
  delay(ms);
}

// 6 =&gt; ACDEFG
void six() {
  digitalWrite(A, ON);
  digitalWrite(B, OFF);
  digitalWrite(C, ON);
  digitalWrite(D, ON);
  digitalWrite(E, ON);
  digitalWrite(F, ON);
  digitalWrite(G, ON);
  delay(ms);
}

// 7 =&gt; ABC
void seven() {
  digitalWrite(A, ON);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, OFF);
  digitalWrite(E, OFF);
  digitalWrite(F, OFF);
  digitalWrite(G, OFF);
  delay(ms);
}

// 8 =&gt; ABCDEFG
void eight() {
  digitalWrite(A, ON);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, ON);
  digitalWrite(E, ON);
  digitalWrite(F, ON);
  digitalWrite(G, ON);
  delay(ms);
}

// 9 =&gt; ABCDFG
void nine() {
  digitalWrite(A, ON);
  digitalWrite(B, ON);
  digitalWrite(C, ON);
  digitalWrite(D, ON);
  digitalWrite(E, OFF);
  digitalWrite(F, ON);
  digitalWrite(G, ON);
  delay(ms);
}</pre>
<p>You might also enjoy:<ol>
<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>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-2-digit-7-segment-display-counter/' rel='bookmark' title='Arduino 2-Digit 7-Segment Display Counter | Part 1'>Arduino 2-Digit 7-Segment Display Counter | Part 1</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-2-of-4/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Controlling a Seven-Segment Display Using Arduino Part 1</title>
		<link>http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-1-of-4/</link>
		<comments>http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-1-of-4/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 15:00:00 +0000</pubDate>
		<dc:creator>Natalia</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[7-segment display]]></category>
		<category><![CDATA[LED]]></category>

		<guid isPermaLink="false">http://www.theelectronicshobbyist.com/blog/?p=16</guid>
		<description><![CDATA[A seven segment display is composed of seven elements that individually on or off can be combined to produce simplified representations of the numbers 0-9. There are two types of 7-segment displays: Common Anode with all the LED anodes connected together. These need a display driver with outputs which become low to light each segment. [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>A seven segment display is composed of seven elements that individually on or off can be combined to produce simplified representations of the numbers 0-9.</p>
<div class="separator" style="clear: both; text-align: center;"><a style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;" href="http://www.theelectronicshobbyist.com/images/7segag.jpg"><img src="http://www.theelectronicshobbyist.com/images/7segag.jpg" border="0" alt="" /></a></div>
<p>There are two types of 7-segment displays:</p>
<ul>
<li>Common Anode with all the LED anodes connected together. These need a display driver with outputs which become low to light each segment. The common anode is connected to +Vs.</li>
<li>Common Cathode with all the LED cathodes connected together. These need a display driver with outputs which become high to light each segment. The common cathode is connected to 0V.</li>
</ul>
<p>The segments in a 7-segment display are referred to by the letters A-G, as shown in the picture. Some displays have a dot to allow for the representation of a decimal point.</p>
<p>You might also enjoy:<ol>
<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/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>
<li><a href='http://www.theelectronicshobbyist.com/blog/arduino-2-digit-7-segment-display-counter-circuit/' rel='bookmark' title='Arduino 2-Digit 7-Segment Display Counter: Circuit | Part 2'>Arduino 2-Digit 7-Segment Display Counter: Circuit | Part 2</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.theelectronicshobbyist.com/blog/controlling-a-seven-segment-display-using-arduino-part-1-of-4/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.theelectronicshobbyist.com @ 2012-02-06 22:14:27 -->
