The Ultrasonic Sensor
is one of the two sensors that give your robot vision [The Light Sensor
is the other]. The Ultrasonic Sensor enables your robot to see and
detect objects. You can also use it to make your robot avoid obstacles,
sense and measure distance, and detect movement.
The Ultrasonic Sensor measures distance in centimeters and in inches. It
is able to measure distances from 0 to 255 centimeters with a precision
of +/- 3 cm.
The Ultrasonic Sensor uses the same scientific principle as bats: it
measures distance by calculating the time it takes for a sound wave to
hit an object and return Ė just like an echo.
Large sized objects with hard surfaces return the best readings. Objects
made of soft fabric or that are curved [like a ball] or are very thin or
small can be difficult for the sensor to detect.
*Note that two or more Ultrasonic Sensors operating in the same room may
interrupt each otherís readings.
Test the Ultrasonic Sensorís ability to measure distance:
1. Connect the Ultrasonic Sensor to the NXT
2. Select the View submenu on the NXT. Select
the Ultrasonic Sensor icon and the port where youíve
connect the sensor.
3. Measure the distance to an object. For example, move
your hand closer to the sensor and watch the readings change.
||The NXT comes with a Try Me function. Connect a Touch Sensor to port 1
of the NXT and select the Try Me submenu on the NXT to test your
Sensor. Youíll get a fun reaction.