Distance sensor for minimum ~6ft?


I am going to install a distance sensor with arduino for detecting at least 6ft, for dimming led strips.
Could you recommend me fairly good distance sensor?
I was considering ultrasound sensor which seems not so accurate on calculating distance from the sensor?
Is there another sensor such as camera(optical detection) which can be used with arduino programming, not with using a computer?

also. is there a sample code for dimming light strip with using pw?

thank you.

I have used an SRF05 and a sharp IR sensor in the past and both were perfectly accurate (OK, accurate within 1 cm (0.5 inch)). The IR won't measure that far, but the SRF05 (or the Parallax Ping, which is basically the same) should do the trick quite nicely

How about LV-MaxSonar-EZ0 Ultrasonic Range Sensor ?
just because of cosmetic reason.

There is the SHARP GP2Y0A02YKOF IR Range Sensor from 20 to 150 cm (5 feet). I use it for my sumo robot.