4-Digit 7-Segment LED Display + Arduino by Jimmacle

Step 2: Wiring the Display and Button

Now, to wiring! To make it easier for you, I am going to put the Arduino pin number first, then the display's pin number.
 
1--14
2--16
3--13
4--3
5--5
6--11
7--15
8--7
9--1 (resistor)
10--2 (resistor)
11--6 (resistor)
12--8 (resistor)

If this is too confusing, say so in the comments, and I'll rewrite it.
Connect the button to Arduino pin 13 and 5V.
I used 1K resistors, but you could get away with less.
 

 
Remove these adsRemove these ads by Signing Up
ruthRon says: Dec 4, 2012. 12:38 AM
thanks for the tutorial! I see resistors in the pictures but not on your pin connection list. where should i put resistors and what value? thanks a lot
Jimmacle (author) says: Dec 4, 2012. 6:21 AM
Sorry, use the resistors instead of jumpers on pins 1, 2, 7, and 8 (the display selection pins). I used 1K resistors, but you could get away with something less.
salmansheikh says: May 16, 2012. 6:52 AM
How do I use the pushbutton to pause the counter rather than reset it?
Jimmacle (author) says: May 16, 2012. 4:53 PM
That is not currently in the program. You could have it set up where it only counts if the button is not pressed, for example:

void loop() {
buttonState = digitalRead(13)
if (buttonState == LOW) {
[insert counting program here]
}
salmansheikh says: May 16, 2012. 5:24 PM
Thanks. I was thinking of making a basketball game timer and also need to use the ":" that could count to 30:00 minutes or down from 30:00 to zero and pause for fouls with a push of the button. I have another display for the score but not sure one Arduino could program both displays...
Jimmacle (author) says: May 16, 2012. 11:13 PM
So you'd definitely want to replace the button with a switch, so you don't have to hold the button down. If both displays show the same thing and have the same pin configuration, it shouldn't be a problem as long as they don't draw too much current (probably not, since they're cycling through and not constantly on). Would you like me to make a program that counts down from a settable time?
salmansheikh says: May 17, 2012. 4:00 AM
No, I want do different things..one will be an game elapsed timer, the other display, two scores, one teams on left of : and one on the right. Games only go to double digits. That may require 2 more buttons and another Arduino unless I can multiplex the control signals somehow, perhaps with a 4th button.
OCPik4chu says: Oct 3, 2012. 3:40 PM
I'm by all means not an expert on the Arduino at all but do have some working programming knowledge. I would think if you instead used the button state to set a variable to 1 or 0 rather than pole the button directly you can put that in the clock loop to freeze the time if its been set. Id recommend just to Google 'Arduino stopwatch' as it should be right in line with what you want, IMO. Additionally, using shift registers would allow you to control several displays with just one Arduino. It will get more complicated if you nest registers but you can still do quite a bit. You should be able to, without it being too complicated get at least 2 7-segment digits per 1 shift register as long as you use the right one. And it would only require 2-3 pins on the Arduino for each one.
Jimmacle (author) says: Oct 3, 2012. 10:58 PM
That would probably be a better way to program the button. I would have used shift registers, but I didn't have any on hand and it would require wiring them to transistors (pins used to select segment are negative). Maybe I'll buy the parts and make another version.
rbarot says: Sep 26, 2011. 8:14 PM
so
Jimmacle (author) says: Sep 27, 2011. 9:05 PM
So... what?
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!