#include <avr/io.h>
int main(void){
   DDRB &= ~(1<<DDB2); // PD3 as Input 
   DDRA |= (1<<DDA7); // PA7 as Output 


   PORTB |= (1<<PB2); // Pullup PB2 

   PORTA |= (1<<PA7); // LED is on
   while (1) {
	if ((~PINB & (1 << PB2))) //button is pressed
   		PORTA |= (1<<PA7); // LED is on
	else
		PORTA &= ~(1<<PA7); // Else LED is off
	
      
   }
}
