Arduino 7-Segment Click Counter

18,447

11

19

Published

Introduction: 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

  • Clocks Contest

    Clocks Contest
  • Water Contest

    Water Contest
  • Creative Misuse Contest

    Creative Misuse Contest

19 Discussions

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);

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

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

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

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

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

GOOD IT HELPED ME A LOT

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

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
user
JanD33

1 year ago

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

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

1 reply