need help with subroutine

I would add a Serial.print (volts); and that will tell you what your analogRead is getting.
Add the print to this part:

void measure()
{
  float volts = analogRead(IRpin)*0.0048828125;   // value from sensor * (5/1024)
  Serial.println(volts);
  float distance = 65*pow(volts, -1.10);          // worked out from graph 65 luckylarry.co.uk
  Serial.println(distance);                       // print the distance
}

You are speeding a lot of time waiting on the Led to go high then low. You can not take readings or do anything while waiting on a delay. For that part I would suggest using the blink with out delay example.
Here is your led part that you might want to change.

  if (distance < 30.00) {
    digitalWrite(LED, HIGH);}
    else
    {
      digitalWrite(LED, LOW);}
     
  delay(5000);

  digitalWrite(LED, LOW);
 
  delay(5000);
     
}