  
  meetAndroid.registerFunction(forward, 'w');
  meetAndroid.registerFunction(backward, 's');
+ meetAndroid.registerFunction(leftTurn, 'a');
+ meetAndroid.registerFunction(rightTurn, 'd');
  meetAndroid.registerFunction(stopIt, 'x');
+
  
   pinMode(LEFTSIDE_NEG, OUTPUT);
   pinMode(LEFTSIDE_POS, OUTPUT);

void loop(){

  meetAndroid.receive();
  
}


  analogWrite(LEFTSIDE_POS,meetAndroid.getInt());
  analogWrite(RIGHTSIDE_POS,meetAndroid.getInt());
  analogWrite(LEFTSIDE_NEG,meetAndroid.getInt());
  analogWrite(RIGHTSIDE_NEG,meetAndroid.getInt()); 
}

void leftTurn(byte flag, byte numOfValues){
  analogWrite(LEFTSIDE_POS,0);
  analogWrite(LEFTSIDE_NEG,meetAndroid.getInt());
  analogWrite(RIGHTSIDE_POS,meetAndroid.getInt());
  analogWrite(RIGHTSIDE_NEG,0);
  Serial.print(meetAndroid.getInt());
}

void rightTurn(byte flag, byte numOfValues){
   analogWrite(LEFTSIDE_POS,meetAndroid.getInt());
   analogWrite(LEFTSIDE_NEG,0);
   analogWrite(RIGHTSIDE_POS,0);
   analogWrite(RIGHTSIDE_NEG,meetAndroid.getInt());  
}

void getSonar(){
  int duration,distance;
  
  duration = pulseIn(ECHO_PIN,HIGH);
  distance = (duration/2)/29.1;
  
  meetAndroid.send(distance);
  Serial.println(distance);
  
}




