loading
Picture of 7 Segment Display On Arduino

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

Picture of Making Connections
7 Segment Fritzing Sketch.PNG

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.

 

doesnt work correctly! could you tell me why?

code is accepted but there has been an error

sbyas1 year ago

Doesn't work correctly. could you tell me why.

SherMarri (author)  sbyas1 year ago

Confirm if you have exact same components? Have you made right connections? Copied all code?

me 2 bro.. not work correctly.. fix this if u can.

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.

Connections which is in the circuit diagram is the correct one.

Connections which is in the description is wrong
Correct description
Connect the pins described below:


  1. Arduino Pin 2 to Pin 7.
  2. Arduino Pin 3 to Pin 6.
  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 9.
  7. Arduino Pin 9 to Pin 10.
  8. GND to Pin 3 and Pin 8 each connected with 220 ohm resistors.
ajmifaz sbyas1 month ago

Connections which is in the circuit diagram is the correct one.

Connections which is in the description is wrong
Correct description
Connect the pins described below:


  1. Arduino Pin 2 to Pin 7.
  2. Arduino Pin 3 to Pin 6.
  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 9.
  7. Arduino Pin 9 to Pin 10.
  8. GND to Pin 3 and Pin 8 each connected with 220 ohm resistors.
ktrantham sbyas11 months ago

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

for(int i=0;i<10;i++)

remove int after for(i=0;i<10;i++) < should look like this

and in the same Void loop add this line before the if statement

int 1;

so it should look like :

void loop()

{

int i;

for( i = 0; i< 10; i++);

{

DONE

smithphyo made it!23 days ago

The code is written for Common Cathode 7 segment LED so if you are
using Common Anode one, just exchange "HIGH' & "LOW" in codes. for
example, Common Cathode 7 segment LED pin 3 & 8 are connected to
GROUND so we need to make respective pin to go HIGH then the related
segment will be on. But Common Anode will be opposite. so 7 segment pin 3
& 8 should be connected to 5V supply then respective pin has to be
in "LOW" so that related segment will be on. I believe it is the only
thing causing some of yours program not working.

7 Segment.jpg
nfarrow made it!1 month ago
timer.png
ajmifaz made it!1 month ago

Connections which is in the description is wrong.

Connections which is in the circuit diagram is the correct one.

Correct description
Connect the pins described below:


  1. Arduino Pin 2 to Pin 7.
  2. Arduino Pin 3 to Pin 6.
  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 9.
  7. Arduino Pin 9 to Pin 10.
  8. GND to Pin 3 and Pin 8 each connected with 220 ohm resistors.
photo1355.jpg

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

Connections which is in the circuit diagram is the correct one.

Connections which is in the description is wrong
Correct description
Connect the pins described below:


  1. Arduino Pin 2 to Pin 7.
  2. Arduino Pin 3 to Pin 6.
  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 9.
  7. Arduino Pin 9 to Pin 10.
  8. GND to Pin 3 and Pin 8 each connected with 220 ohm resistors.
navneet kaur6 months ago

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?

Connections which is in the circuit diagram is the correct one.
Connections which is in the description is wrong
Correct description
Connect the pins described below:


  1. Arduino Pin 2 to Pin 7.
  2. Arduino Pin 3 to Pin 6.
  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 9.
  7. Arduino Pin 9 to Pin 10.
  8. GND to Pin 3 and Pin 8 each connected with 220 ohm resistors.
cristianoab made it!3 months ago

Works

IMG_20150529_224939.jpg
navneet kaur6 months ago

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?

navneet kaur6 months ago

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?

just for rate6 months ago

thank you a lot this works 100% with me :) :)

ktrantham11 months ago

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

for(int i=0;i<10;i++)

remove int after for(i=0;i<10;i++) < should look like this

and in the same Void loop add this line before the if statement

int 1;

so it should look like :

void loop()

{

int i;

for( i = 0; i< 10; i++);

{

DONE

ktrantham11 months ago

Code is defunct can you fix or identify problems in all if statements compile reports errors with all if"s

sbyas1 year ago
I do but when I turned the Arduino on then the 7 segment display was flashing on and off the letters.

Looks like it's all there....