Each LED has it's own resistor (550 Ohm).
The sketch is a little long to post it here (it's a binary clock), but here are the extracts, I'd consider as important:
void setup() {
pinMode(dcfpin, INPUT);
pinMode(buttonpin, INPUT);
for(int i=0; i<11; i++)
{ pinMode(i, OUTPUT); }
pinMode(dcfpowerpin, OUTPUT);
for(int i=14; i<20; i++)
{ pinMode(i, OUTPUT); }
//This is a function which simply sets all the output pins to HIGH
setall(false);
//This function encodes the DCF- signal
gettime();
//This function sets the status of the LEDs due to the current time
show();
}
void loop()
{
//sekunden, minuten, stunden and tag are the variables which hold the current time
sekunden++;
if(sekunden==60){minuten++; sekunden=0;}
if(minuten==60){stunden++; minuten=0; }
if(stunden==24){tag++; stunden=0;}
show();
if(digitalRead(buttonpin)==LOW){chkbuttoninput();}
delay(999);
delayMicroseconds(250);
}