Ultrasonic Sensor and cables
I love to hate these things.
They work fantastic...but they do take 2 I/O pins. One for the ping and one for the echo. Another thing I didn't like about these was the need for a 4 wire connector. Three wires are everywhere but 4 wires.... Well I decided to bundle this guy with the wires and a couple of different housings so that you can decide what works best for your design. And at 3.75 each how can you go wrong.
I also whipped up a library to make everything easy. Just download the Ultra Sonic HC_SR04.zip file and install it into your Arduino library. From there is just setting a couple of pins and asking it the distance in centimeters or inches.Instruction Video and Code Click here: