Arduino 7-Segment Click Counter

20,005

11

20

Intro: Arduino 7-Segment Click Counter

Check out how to make your own 7 segment click counter!!

Step 1: Materials You Will Need:

1x Arduino Board(does not matter which version).

1x BreadBoard.

1x 1 Digit 7 Segment display.

2x Push Buttons.

4x 220 ohm resistors(Will work up to 1K).

16x Male to male jumper wires.

Step 2: Connect the Arduino to the BreadBoard:

Connect as shown in the image above:

Arduino 5V pin to the PLUS of the breadboard.

Arduino GND to the MINUS of the breadboard.

7-Segment pin 8 & 3 to the PLUS of the breadboard through your resistors.

NOTE: if your 7 segment display is a common cathode display, connect pins 8 & 3 of the display to the GND!!

7-Segment pin 1 to Arduino pin 6.

7-Segment pin 2 to Arduino pin 5.

7-Segment pin 4 to Arduino pin 4.

7-Segment pin 5 to Arduino pin 7.

7-Segment pin 6 to Arduino pin 2.

7-Segment pin 7 to Arduino pin 3.

7-Segment pin 9 to Arduino pin 8.

7-Segment pin 10 to Arduino pin 9.

Connecting the buttons:

connect one side of the button to the PLUS of the breadboard;

connect the other side through a resistor to the GND of the breadboard, and to Arduino pin 12.

Do that for the second button and connect it to Arduino pin 13.

Step 3: The Code:

Download the code and insert it to arduino IDE, and have fun!!

Write your comments down bellow!!

Share

Recommendations

  • Optics Contest

    Optics Contest
  • Electronics Tips & Tricks Challenge

    Electronics Tips & Tricks Challenge
  • Plastics Contest

    Plastics Contest

20 Discussions

0
None
KiflieD

1 day ago

why my 7 segment not function, but push button counter function?

0
None
muhdf23

1 year ago

how can i confirm the number to continue the program by add a button???

if (button == high)

{

if (??????)

With the code provided my display jumps around between 2 numbers. What's wrong? I am using a common cathode display. Also it would be easier if you just used the input pullup command on the buttons

pinMode(button, INPUT_PULLUP);

0
None
AngelicaN12

1 year ago

How can I stop it from looping? Like If i push the buttonUp, it will go from 0-9 only even if i push the buttonUp again, it'll not change anything and still stuck up to 9 only. Same goes for the buttonDown, if I push the buttonDown, it'll go from 9-0 and nothing more. Not repeating the same cycle again. And also, I have this problem when I tried to click a few more times (after it reached the last number for both buttonDown and Up) it should not store the clicks. Example: I pushed the buttonUp and it reached to 9, after trying to click it some few more, lets say 3. If I clicked the buttonDown, it should automatically show the number from 9 to 8 without clicking 3 times before it goes to 8. Do you get what I mean? Im having a hard tme with these codes and I'm still not familiar with them. :( Help guyzzzz

0
None
jolos2YahavHadad

Reply 1 year ago

Please send me how to add another 1 digit and how the would be look like many thanks

0
None
jolos2jolos2

Reply 1 year ago

How the code would be look like when added another 1 digit

0
None
TholudAYahavHadad

Reply 1 year ago

please give me too, i need to add 1 more digit

0
None
Bverysharp

1 year ago

A very helpful and educational instructable. I specially appreciated the comment from KoKoY2 to convert the code to common cathode.

0
None
Adityan57

1 year ago

GOOD IT HELPED ME A LOT

0
None
ReymarB1

1 year ago

i have a problem in my seven segment, if use the common anode, the seven segment isn't displaying anything, if use the the common cathode, some of the segments are not working. help pls

1 reply
0
None
Funnyguy123p -PReymarB1

Reply 1 year ago

after fooling around i found a solution. flip around the code for the leds in the segment display i.e. if it says digitalWrite (A,HIGH); switch it to digitalWrite(A,LOW);

0
None
JanD33

1 year ago

how to make two digit one pls :) text me. Thanks a lot

0
None
seamster

2 years ago

Great instructions. Thank you for sharing how you made this little counter! :)

1 reply