Connecting an ultrasonic sensor
Physically connecting the sensor
Connecting the Ultrasonic Rangefinder to your VEX robot should be quite simple. The Swervebot, off which our robot is based, has its own mount for the sensor that will work perfectly for our purposes. If you have an alternate robot, or just want to be different, you can easily come up with your own mounting option.
Wiring up the sensor
The VEX Ultrasonic Rangefinder will be wired up just like all the other sensors. The red and black wires will go to the 5V supply, and ground, respectively. The input and output signal wires will both go to digital ports.
We will be attaching the Input signal wire to digital port 7 and the Output wire to digital port 8.