volatile boolean ledBlue = false;
int btnRE = 0;

void setup() {
  Serial.begin(9600);
  pinMode(8,OUTPUT);
  pinMode(2, INPUT_PULLUP);
  attachInterrupt(0,buttonPressed, RISING);
}

void loop() {
  btnRE = digitalRead(2);
  Serial.print(btnRE);
delay(200);
}

void buttonPressed()
{
  if(ledBlue)
  {
    ledBlue = false;
    digitalWrite(8,LOW);
  }else
  {
    ledBlue= true;
    digitalWrite(8,HIGH);
  }
  delay(200);
}