how to Measure distance with photo transistor and led

Need to know which phototransistor and LED specifications

The more specific information you provide, the more specific information we can provide. So based on the information you have provided:

  1. Connect LED to power with current limiting resistor.
  2. Connect phototransistor to a different current limiting/sense resistor similar to LED.
  3. Connect phototransistor/current limiting resistor junction to analog input on the Arduino.