Each of the digital i/o pins on the Arduino can only source or sink 40mA, and pushing the Arduino past these limits may damage it. If you need to get a little more power out of your outputs, try using a Darlington ULN2803.
The Darlington chip can source up to 500mA of current out each pin, and operates at up to 50V, so it's beefy enough to drive motors, incandescent bulbs, relays, solenoids and more. You can find the datasheet here. The
Darlington output pins can even be connected in parallel for higher current capability.
Get this IC at Digikey 296-19046-5-ND or at Sparkfun COM-00312
/*7 seg display with ULN2803 by RU4Realz July 2012 arduino pin connections (via ULN2803): arduino (digital) pin 0 7 seg pin f 1 g 2 a 3 b 4 c 5 d 6 e */ void setup() { for (byte a=0;a<8;a++){ pinMode(a,OUTPUT);//set digital pins 0 - 6 as outputs } } void loop() { for (byte i = 0; i < 10; i++){//for 0 -9 switch(i){ case 0://if i == 0, turn on appropriate leds PORTD&=128;//turn digital 0-6 off digitalWrite(0,HIGH); digitalWrite(2,HIGH); digitalWrite(3,HIGH); digitalWrite(4,HIGH); digitalWrite(5,HIGH); digitalWrite(6,HIGH); break; case 1://if i == 1 PORTD&=128;//turn digital 0-6 off digitalWrite(3,HIGH); digitalWrite(4,HIGH); break; case 2://if i == 2 PORTD&=128;//turn digital 0-6 off digitalWrite(1,HIGH); digitalWrite(2,HIGH); digitalWrite(3,HIGH); digitalWrite(5,HIGH); digitalWrite(6,HIGH); break; case 3: PORTD&=128; digitalWrite(1,HIGH); digitalWrite(2,HIGH); digitalWrite(3,HIGH); digitalWrite(4,HIGH); digitalWrite(5,HIGH); break; case 4: PORTD&=128;//turn digital 0-7 off digitalWrite(0,HIGH); digitalWrite(1,HIGH); digitalWrite(3,HIGH); digitalWrite(4,HIGH); break; case 5: PORTD&=128;//turn digital 0-7 off digitalWrite(0,HIGH); digitalWrite(1,HIGH); digitalWrite(2,HIGH); digitalWrite(4,HIGH); digitalWrite(5,HIGH); break; case 6: PORTD&=128;//turn digital 0-7 off digitalWrite(0,HIGH); digitalWrite(1,HIGH); digitalWrite(2,HIGH); digitalWrite(4,HIGH); digitalWrite(5,HIGH); digitalWrite(6,HIGH); break; case 7: PORTD&=128;//turn digital 0-7 off digitalWrite(2,HIGH); digitalWrite(3,HIGH); digitalWrite(4,HIGH); break; case 8: PORTD&=128;//turn digital 0-7 off digitalWrite(0,HIGH); digitalWrite(1,HIGH); digitalWrite(2,HIGH); digitalWrite(3,HIGH); digitalWrite(4,HIGH); digitalWrite(5,HIGH); digitalWrite(6,HIGH); break; case 9: PORTD&=128;//turn digital 0-7 off digitalWrite(0,HIGH); digitalWrite(1,HIGH); digitalWrite(2,HIGH); digitalWrite(3,HIGH); digitalWrite(4,HIGH); break; } delay (1000);//wait 1 sec } }