void setup()
{
// Starting registering states
//Pin state must be declared using PORTx Command
//First bits (00) of PORTB correspond to nothing
PORTB = B00101010;
//WARNING: last bits of PORTD (...10) correspond to RX and TX pins, do not change them!
PORTD= B10000010;
}
void loop()
{
//Light up pins 13, 11 , 9 , 7
DDRB = B00101010;
DDRD = B10000010;
delay(1000);
//Lights off
PORTB = B00000000;
PORTD = B00000010;
DDRB = B00000000;
DDRD = B00000010;
// Light up pins 12, 10, 8, 6
PORTB = B00010101;
PORTD = B01000010;
DDRB = B00010101;
DDRD = B01000010;
delay(1000);
//sets 13, 11, 9, 7 pins back to outputs to be looped again
PORTB = B00101010;
PORTD= B10000010;
}