Dimming 12V led strip with rangefinger

Is the reading correct if you disconnect Pin 9 (the LED pin)? If so that might mean that the LED circuit is causing problems with the power going to the distance sensor. The PWM pulses can create a lot of noise.

I don't see a resistor between the Arduino and the Transistor. If that is an NPN transistor the Base-Emitter junction acts like a diode straight to Ground. Without a resistor (try 1K) it will draw too much current from the Arduino pin.