Ultrasonic Rangefinder Forward till Near - ROBOTC.net
Ultrasonic Rangefinder Forward till Near - ROBOTC.net
Ultrasonic Rangefinder Forward till Near - ROBOTC.net
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Sensing<br />
<strong>Ultrasonic</strong> <strong>Rangefinder</strong> <strong>Forward</strong> <strong>till</strong> <strong>Near</strong> (cont.)<br />
The <strong>Ultrasonic</strong> <strong>Rangefinder</strong> offers exactly this capability. Using the same physical principle<br />
as a bat or submarine’s sonar, the <strong>Ultrasonic</strong> <strong>Rangefinder</strong> measures distances using<br />
sound. It sends out a pulse of sound, then waits to hear the sound’s echo off of a solid<br />
object in the environment. By measuring how long it takes for the sound to bounce back,<br />
the sensor can calculate the distance that the sound must have traveled, and hence, how<br />
far away the object was that reflected it back.<br />
The <strong>Ultrasonic</strong> <strong>Rangefinder</strong> will work in a very similar way to the Encoder program you<br />
wrote in the previous section, but instead of measuring the distance that the wheel has<br />
turned, it will use the <strong>Ultrasonic</strong> <strong>Rangefinder</strong> to measure the distance to the nearest object<br />
in front of the arm.<br />
1. Add an <strong>Ultrasonic</strong> <strong>Rangefinder</strong> to the front of the robot’s arm. The design shown below<br />
will be used as the reference for the remainder of the unit. If you choose to use a<br />
design that differs significantly from this one, you may need to adjust accordingly.<br />
© Carnegie Mellon Robotics Academy / For use with VEX ® Robotics Systems<br />
1a. Add the sensor<br />
Attach the <strong>Ultrasonic</strong><br />
<strong>Rangefinder</strong> to the front of<br />
the Squarebot 3.0 arm.<br />
<strong>ROBOTC</strong><br />
<strong>Ultrasonic</strong> <strong>Rangefinder</strong> • 2