how to Measure distance with photo transistor and led

One block diagram coming up:

POWER -> LED

POWER -> ARDUINO <- PHOTOTRANSISTOR

There you go.