The following circuit was presented by Jim Ubersetzig. It demonstrates how to connect four GP2D02 InfraRed range sensors to the Basic Stamp 2 for the purpose of enabling navigation with respect to objects such as walls.
A description of where the sensors are installed on the robot is included on the associated software to implement this functions, bs2dist.txt.