 PID pidR(&inputR,&outputR,&SetpointR,Kp,Ki,Kd,DIRECT);
 
 void setup() {
-  pinMode(INTA,INPUT);
-  pinMode(INTB,INPUT);
-
+  pinMode(trigpin,OUTPUT);
+  pinMode(echopin,INPUT);
+  
   initleftwheel();
   initrightwheel();
   
   attachInterrupt(0,wheelspeedL,CHANGE);
   attachInterrupt(1,wheelspeedR,CHANGE);
 
-  Serial.begin(9600);
+  Serial.begin(19200);
 }
 
 void loop() {
   char key[2];
   if(Serial.available()>0)
   {   
-      Serial.readBytes(key,sizeof(key)); 
-  }
+      Serial.readBytes(key,sizeof(key));
+  }
+  else 
+    return;
+
+  switch(key[1])
+  {
+    case 'l':
+      SetpointL=10;
+      SetpointR=10;
+      break;
+    case 'h':
+      SetpointL=15;
+      SetpointR=15;
+      break;
+    default:
+      break;
+  }
+  
   switch(key[0])
   {
     case 'L':

  pinMode(pinRa,OUTPUT);
  pinMode(pinRb,OUTPUT);
  pidR.SetMode(AUTOMATIC);
  pidR.SetSampleTime(100);
}

void wheelspeedL()

    case 'R':
      right();
      break;
    case 'F':
      forbac();
      break;
    case 'B':
      back();
      break;
    default:
      break; 
  }

  inputL=abs(speedvalueL);
  inputR=abs(speedvalueR);

  if(pidL.Compute())
    speedvalueL=0;
  if(pidR.Compute())
    speedvalueR=0;

}

void initleftwheel()
