So, I’ve recently been looking into using the VEX Ultrasonic Range Finder as a motion sensor. I plan to use it as a sensor to stop movement if the robot gets too close to an object.
This is a ping-response type of ultrasonic sensor. You may consider instead buying an encoder from MaxBotics using the $35 voucher that (while not guaranteed) has come in the kit for the past number of years. They make higher-quality sensors than the Vex one designed for kids to play with, and they can connect via an analog signal or digital serial interface, which is probably easier to set up than a ping-response type.