int incomingByte = 0; 
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  pinMode(8,OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  {  if (Serial.available() > 0) 
     { incomingByte = Serial.read();
       if(incomingByte==1)
  if(incomingByte==1)
  {
    digitalWrite(8,HIGH);
    delay(1000);
  }
  else
  digitalWrite(8,LOW);
}

