Need Help with arduino and mitapp

I have here a lines of codes on my parking assistance project. I'm new to mitapp inventor and what i want to do is change the values of measured distance through the mitapp based on users preference. example the user want the measured value of the red is 17 inches. please help me!!!

void loop(){

 long duration, Distance;
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn (echoPin, HIGH);
  Distance = (duration/2 ) /74; //distance in inches

if (counter < 20){      // Do the rest if the car is still moving
  if (Distance > 200){   //nothing in garage
      turnThemAllOff();
  }
  if ((Distance >40 ) && (Distance <= 200)){
    digitalWrite(greenLed,HIGH);
    digitalWrite(yellowLed,LOW);
    digitalWrite(redLed, LOW);
    noTone(buzzer);
  }
  if((Distance >15 ) &&( Distance <= 55)){
    digitalWrite(yellowLed, HIGH);
    digitalWrite(redLed, LOW);
    digitalWrite(greenLed,LOW);
    noTone(buzzer);
  }
  if (Distance <= 15){
    digitalWrite(redLed, HIGH);
    digitalWrite(greenLed, LOW);
    digitalWrite(yellowLed,LOW);
    noTone(buzzer);
  }
  if (Distance <8) {   // if object is too close - start buzzer
      tone(buzzer, 500);
  }
}

  if ((Distance == TempDistance) || ((Distance+1) == TempDistance) || ((Distance-1) == TempDistance)){
    if (counter >= 20){
        Serial.println("No Movement detected, turning off the lights");
        turnThemAllOff();
    } else {
    counter++;
    }
  } else {
    counter = 0;
  }
  TempDistance = Distance;
  Serial.print(Distance);
  Serial.print("inches");
  Serial.print("Counter");
  Serial.println(counter);
  delay(500);
  displayStopDist();
  display.display();
}

Dear @DARYL_CAVAN,
as far as I can understand, what you need at first is to implement a bluetooth communication between Arduino and an app made by AI2.
By searching the forum, tagging Arduino and/or Bluetooth you'll find a huge amount of info related to.
Please be aware that, depending on the Android version of your phone (or users' phone), specific permissions shall be given to the app in order to let the BT work.
The three annexed files should help you to make a very basic BT comm's between a phone and an Arduino UNO/NANO (with HC05 or HC06 BT shield) or an ESP32 board.
ESP32_BT_Monitor.ino (1.4 KB)
BT_Send_Monitor.ino (1.9 KB)
BT_to_ESP32.aia (24.9 KB)
The .aia file is the app for AI2 (don't care about the name ESP32, it works also toward UNO/NANO) , the ino files are for UNO/NANO and for ESP32.
Please pay attention that in the AI2 blocks, the BT address of the connected device is the one of my device, you shall substitute it with the one of the device you want to connect (your Arduino BT shield or ESP32).
Best wishes.

PS Many examples of AI2<=>Arduino interfaces, based on BT comm's, can be found also on @Juan_Antonio's web site (KIO4.com) or on @ChrisWard's one (professorcad.co.uk)