loading

This instructable shows how to display 0-9 digits on 7 Segment Display using Arduino.

What do you need:

  • Arduino Uno 3
  • 7 Seven Segment Display
  • 2 x 220 Ohm Resistors
  • Jumper Wires

Step 1: Making Connections

Connect the pins described below:

  1. Arduino Pin 2 to Pin 9.
  2. Arduino Pin 3 to Pin 10.
  3. Arduino Pin 4 to Pin 4.

  4. Arduino Pin 5 to Pin 2..

  5. Arduino Pin 6 to Pin 1.

  6. Arduino Pin 8 to Pin 7.

  7. Arduino Pin 9 to Pin 6.

  8. GND to Pin 3 and Pin 8 each connected with 220 ohm resistors.

<p>Took me a while to figure out I had a common anode display and that the instructable was made for a common cathode display. If you have a common anode display, change the Ground jumper wire on the arduino to the 3V or 5V pins and things will be more interesting.</p>
<p>Where is the code for this?</p>
<p>wow couldnt beliwvbe it whgewnb i saw i vy is di it!</p>
<p>Doesn't work correctly. could you tell me why.</p>
<p>Confirm if you have exact same components? Have you made right connections? Copied all code?</p>
<p>me 2 bro.. not work correctly.. fix this if u can.</p>
<p>Connections which is in the <strong>circuit diagram</strong> is the correct one. </p><p>Connections which is in the <strong>description</strong> is wrong<br><strong>Correct description<br></strong>Connect the pins described below:</p><ol> <br><li>Arduino Pin 2 to Pin 7.<li>Arduino Pin 3 to Pin 6.<li>Arduino Pin 4 to Pin 4.<li>Arduino Pin 5 to Pin 2.<li>Arduino Pin 6 to Pin 1.<li>Arduino Pin 8 to Pin 9.<li>Arduino Pin 9 to Pin 10.<li>GND to Pin 3 and Pin 8 each connected with 220 ohm resistors.</ol>
<p>thanks very much (y) ...at last it worked ....</p>
<p>Hey! Try to switch from GND to VCC. It worked for me. If you search for a datasheet or a pinout description you will notice that the 3 and 8 pins are connected to VCC not GND. Try this way...maybe it will work.</p>
<p>maby you have a wrong 7 segment display maby it's a common cathode</p>
<p>Connections which is in the <strong>circuit diagram</strong> is the correct one. </p><p>Connections which is in the <strong>description</strong> is wrong<br><strong>Correct description<br></strong>Connect the pins described below:</p><ol> <br><li>Arduino Pin 2 to Pin 7.<li>Arduino Pin 3 to Pin 6.<li>Arduino Pin 4 to Pin 4.<li>Arduino Pin 5 to Pin 2.<li>Arduino Pin 6 to Pin 1.<li>Arduino Pin 8 to Pin 9.<li>Arduino Pin 9 to Pin 10.<li>GND to Pin 3 and Pin 8 each connected with 220 ohm resistors.</ol>
<p>HERE IS THE FIX!!!!!!!!!!!!!!!!!!! the code is defunct now due to newer IDE versions: to fix the code change in the line of Void Loop</p><p>for(int i=0;i&lt;10;i++)</p><p>remove int after for(i=0;i&lt;10;i++) &lt; should look like this</p><p>and in the same Void loop add this line before the if statement</p><p>int 1;</p><p>so it should look like :</p><p>void loop()</p><p>{</p><p>int i;</p><p>for( i = 0; i&lt; 10; i++);</p><p>{</p><p>DONE</p>
<p>Worked fine </p><p>Thank-you for sharing</p>
<p>The reason it does'nt work is because Arduino pin 1 and 7 is not used, correct code :</p><p>{<br> digitalWrite(2,LOW);<br> digitalWrite(3,LOW);<br> digitalWrite(4,LOW);<br> digitalWrite(5,LOW);<br> digitalWrite(6,LOW);<br> digitalWrite(8,LOW);<br> digitalWrite(9,LOW);<br>}</p><p>And yes, I made it but don't have an image :D</p>
<p>doesnt work correctly! could you tell me why? </p><p>code is accepted but there has been an error</p>
<p>The code is written for Common Cathode 7 segment LED so if you are <br>using Common Anode one, just exchange &quot;HIGH' &amp; &quot;LOW&quot; in codes. for <br>example, Common Cathode 7 segment LED pin 3 &amp; 8 are connected to <br>GROUND so we need to make respective pin to go HIGH then the related <br>segment will be on. But Common Anode will be opposite. so 7 segment pin 3 <br> &amp; 8 should be connected to 5V supply then respective pin has to be <br>in &quot;LOW&quot; so that related segment will be on. I believe it is the only <br>thing causing some of yours program not working. </p>
<p>7 Segment working in action.<br><a href="https://instagram.com/p/5tproHyMFj/?taken-by=veggievampire" rel="nofollow">https://instagram.com/p/5tproHyMFj/?taken-by=veggi...</a></p>
<p>Connections which is in the <strong>description</strong> is wrong.</p><p>Connections which is in the <strong>circuit diagram</strong> is the correct one. </p><p><strong>Correct description<br></strong>Connect the pins described below:</p><ol> <br><li>Arduino Pin 2 to Pin 7.<li>Arduino Pin 3 to Pin 6.<li>Arduino Pin 4 to Pin 4.<li>Arduino Pin 5 to Pin 2.<li>Arduino Pin 6 to Pin 1.<li>Arduino Pin 8 to Pin 9.<li>Arduino Pin 9 to Pin 10.<li>GND to Pin 3 and Pin 8 each connected with 220 ohm resistors.</ol>
<p>doesn't work and when i change the code nothing happened and the connections in the picture aren't the same in the writting or the numbering were wrong</p>
<p>Connections which is in the <strong>circuit diagram</strong> is the correct one. </p><p>Connections which is in the <strong>description</strong> is wrong<br><strong>Correct description<br></strong>Connect the pins described below:</p><ol> <br><li>Arduino Pin 2 to Pin 7.<li>Arduino Pin 3 to Pin 6.<li>Arduino Pin 4 to Pin 4.<li>Arduino Pin 5 to Pin 2.<li>Arduino Pin 6 to Pin 1.<li>Arduino Pin 8 to Pin 9.<li>Arduino Pin 9 to Pin 10.<li>GND to Pin 3 and Pin 8 each connected with 220 ohm resistors.</ol>
<p>It doesn't work...the connections done in circuit diagram and those given in description are different...which one is correct? The code works fine with the changes given in the comments.. can u tell me where lies the flaw?</p>
<p>Connections which is in the <strong>circuit diagram</strong> is the correct one. <br>Connections which is in the <strong>description</strong> is wrong<br><strong>Correct description<br></strong>Connect the pins described below:</p><ol> <br><li>Arduino Pin 2 to Pin 7.<li>Arduino Pin 3 to Pin 6.<li>Arduino Pin 4 to Pin 4.<li>Arduino Pin 5 to Pin 2.<li>Arduino Pin 6 to Pin 1.<li>Arduino Pin 8 to Pin 9.<li>Arduino Pin 9 to Pin 10.<li>GND to Pin 3 and Pin 8 each connected with 220 ohm resistors.</ol>
<p>Works</p>
<p>It doesn't work...the connections done in circuit diagram and those given in description are different...which one is correct? The code works fine with the changes given in the comments.. can u tell me where lies the flaw?</p>
<p>It doesn't work...the connections done in circuit diagram and those given in description are different...which one is correct? The code works fine with the changes given in the comments.. can u tell me where lies the flaw?</p>
<p>thank you a lot this works 100% with me :) :)</p>
<p>HERE IS THE FIX!!!!!!!!!!!!!!!!!!! the code is defunct now due to newer IDE versions: to fix the code change in the line of Void Loop</p><p> for(int i=0;i&lt;10;i++)</p><p>remove int after for(i=0;i&lt;10;i++) &lt; should look like this</p><p>and in the same Void loop add this line before the if statement</p><p>int 1;</p><p>so it should look like :</p><p>void loop()</p><p>{</p><p> int i;</p><p> for( i = 0; i&lt; 10; i++);</p><p> {</p><p>DONE</p>
<p>Code is defunct can you fix or identify problems in all if statements compile reports errors with all if&quot;s</p>
I do but when I turned the Arduino on then the 7 segment display was flashing on and off the letters.
<p>Looks like it's all there....</p>

About This Instructable

55,317views

41favorites

License:

More by SherMarri:7 Segment Display On Arduino
Add instructable to: