#include #include #define blink_delay 10 // pin info // led = Pin10 = PA3(ADC3/T0/PCINT3) // button = Pin 6 = PA7(PCINT7/ICP/OC0B/ADC7) int main(void){ DDRA |= _BV(PA3); // led // same as DDRA = DDRA | _BV(PA3) //DDRA in page66 of datasheet //|= bitwise inclusive OR and assignment operator -> 011 | 001 = 011 //_BV(bit) ... converts a bit number to a byte value, you need to include avr/io.h to use // this means that PA3 is a bit... // Looping forever while(1){ PORTA |= _BV(PA3); // turn on // PORTA example in page56 of datasheet _delay_ms(blink_delay); PORTA = 0; // turn off // clears PORTA? _delay_ms(blink_delay); } return 1; }