Proximity Sensors -all about them

i went to a shop to search for some sort of a distance mesuring sensor(for collision detection &prediction)

the guy showed me a long rod-like device(had metal covering)
i noticed that it had 2 leds in the front[and , as far as i remember, it had 4 wires coming out of it ]

it was priced at about $20

so, i need to know, will that be of any use in making a collision detectin device(it should ping at say, a feet from the sensor )?

Sounds like it might be an IR transmitter/receiver pair. Depending on the output strength, input sensitivity, and reflectivity of the object they might be sensitive at one foot. Without the specs it will be hard to tell.

but tell me

will 4 wire , will it be even compatible with arduino?

You need to provide more information on the device you looked at for a definite answer. Nobody can help you hook it up if you can't provide any documentation on it.

As an alternative, Sharp brand distance sensors are frequently used for the problem you're describing.

harshvardhan:
but tell me will 4 wire , will it be even compatible with arduino?

If it is an IR transmitter/receiver pair then it will probably be compatible with Arduino given some additional components like resistors and transistors.

it was around 20 $

is it worth it?

Since Jameco.com sells the Optek OPB606A for $1.39 it would seem that $20 is a bit much for a reflective object sensor.