Ultrasonic rangfinders are a cheap and easy way to gather obstacle avoidance data. When added to a servo motor they form something of a scanning radar for near-proximity objects.
In this implementation, [Rui Cabral] is driving the servo, and collecting data from the sensor using a PIC 18F4520. The servo rotates 180 degreees, taking sensor measurements in increments of nine degrees. If it discovers obstacles, the distance and orientation are recorded. Feedback is displayed on a 20-LED bar graph display which shows a moving LED to track the sensor orientation, with LEDs remaining lit whenever an object is found. Right now the obstacle data is pushed over a serial connection with a PC, but could easily be injected into navigation logic for a robot in order to triangulate a path around the obstruction. You can see [Rui's] project in action after the break.
We looked in on the same concept with a different display technique a couple of years back. That hack used an Arduino and Processing to map sensor data with a traditional green sweep display.