Quote:
Originally Posted by Phoenix Spud
Has any one implimented a class for an analog ultrasonic sensor to go with the WPILib? We are using the Max Botix EZ1, and therefore cannot use the WPILib class--which is for a digital ultrasonic sensor. We have started to create such a class but we think that the FPGA does not oversample the channel we are using (module 1, port 3). Because we created our code to do this we are getting "fatal errors." Have you found any documentation for the FPGA on the analog module?
Thanks 
|
Dear Phoenix Spud,
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.