// Globale Variablen
byte zaehler = 0;
byte bitwert;
void setup() {
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
}
void loop() {
for (byte n = 0; n <= 3; n++)
{
bitwert = (zaehler & (1<<n));
if (bitwert == (1<<n))
digitalWrite(n+8, HIGH);
else
digitalWrite(n+8, LOW);
}
delay(1000);
if (zaehler > 15)
zaehler = 0;
else
zaehler++;
}