Ultrasonic

What is it?

An ultrasonic rangefinder using high frequency sound to determine distance to an object. The rangefinders generally operate at distances up to 7-9 feet. There are two styles of sensors in common use, some that use two transducers (a microphone and a speaker) and those that use a single transducer. The commonly used single transducer sensor is supplied by Maxbotics and uses an analog connection to the robot.

The sensor implemented by this class is the double transducer style with two digital I/O connections to the robot, one (output) to cause the sensor to send a ping and the other (input) to determine the distance to the target.

If your application uses the analog sensor, then don't use this class. Instead just use an analog input and refer to the sensor documentation for the mapping between voltage and distance.

Properties

Ping Port (Digital)
The DIO Port on the roboRIO or MXP that the ping output is plugged into.
Echo Port (Digital)
The DIO Port on the roboRIO or MXP that the echo input is plugged into.

See Also