We have had a number of teams that have requested assistance with code support for the MaxSonar line of sensors. These are the EZ0, EZ1, EZ2, EZ3, EZ4, and the new WR1 (narrow beam sensor in a rugged PCV package).
All of these sensors are backward compatible with the Vex ultrasonic rangefinder, and the Daventech SRF04 rangefinder. As such the MaxBotix Inc., sensors are all compatible with software provided in the C/C++ WPI Robotics Library. For revision 0.5 – 28 December 2008 this is located on page 46.
Specifically the section “Ultrasonic rangefinder”.
The SRF04 is shown in the photo, but any of the MaxSonar sensors can be substituted. Just follow the pin out below.

Then just follow the application note.
If you have any questions, please email me at the address below.