// Ahmed Abobaker - Fab Academy 2017
// 16 April 2017  
// MIT License

#define F_CPU 20000000UL
#include <avr/io.h>
#include <util/delay.h>



int main (void) {

DDRA &= ~(1 << PA3); //Setting PA3 as input

DDRB |= (1 << PB2); //Setting PB2 as output

PORTA |= (1 << PA3); // This is to activate the pull up resistor 


while(1) {

if ( PINA & (1<<PA3) ) {


PORTB &= ~(1 << PB2); 
}

else{
PORTB |= (1 << PB2); 
}

}

}