int main() {
volatile unsigned long i;
DDRB |= (1 << 2); // pin come output
while (1) {
PORTB |= (1 << 2); // accendi LED
for (i = 0; i < 500000; i++) {;} // ritardo
PORTB &= ~(1 << 2); // spegni LED
for (i = 0; i < 500000; i++) {;} // ritardo
}
}