#include <avr/io.h>
#include <util/delay.h>

int main(void){

  //Set PA6 to be output - connected LED to PA6
  DDRA =0b10000000;
  //PORTA = (1 << PA7);
  while(1){

   if((PINA && (0b00001000)) == 0 )
    {
    PORTA = (1 << PA7); // set PA7 high means LED will be on
    }
    else 
    {
    PORTA &= ~(1 << PA7); // set PA7 to low means LED will be Off
    }
    
  }
  return 1;
  
} 