Arduino
2-Digit LED
 
4-Digit LED
 
 
These is a Common Anode LEDs, which means that the positive end of every LED on each digit is connected together (eg. on the Dual LED, Pin 12 is the common anode for Digit 1 and Pin 5 is the common anode for digit 2)
You should use a 330Ω resistor in series with each diode. Ideally you should have one for each cathode (negative end), but using one on each anode will work, but give uneven lighting - saves a lot of wiring though!
 
For the example counting code, the wiring for each display is as follows:
 
Dual Display, connect:
  • Pin 7 through a 330Ω resistor to Arduino pin10
  • Pin 8 through a 330Ω resistor to Arduino pin11
  • pins 10, 9, 1, 4, 3, 6, 5 directly to Arduino pins 2, 3, 4, 5 ,6 ,7 ,8, 9 in the same order
Quad Display (Decimal points or Colon is same pinout and connections), connect:
  • Pin 6 through a 330Ω resistor to Arduino pin10
  • Pin 8 through a 330Ω resistor to Arduino pin11
  • Pin 9 through a 330Ω resistor to Arduino pin12
  • Pin 12 through a 330Ω resistor to Arduino pin13
  • pins 11, 7, 4, 2, 1, 10, 5 directly to Arduino pins 2, 3, 4, 5 ,6 ,7 ,8, 9 in the same order