We're sorry, but you must have Javascript enabled in your browser to access this exercise.

Demo of Ultrasonics

Position the Robot and See how it Uses Ultrasonics to look for objects
By default it has one forward looking sensor; but tick the checkbox for two which act at 45 degrees
To move the robot, click within it to select it, then click again where you want it repositioned.
You can also click on the other objects to move them in the same way.

Keyboard controls

Press S to send pulse, and T to toggle whether two sensors.

For moving items, select a robot or object by pressing the key depicted below the main canvas. Then press I, J, K or M to move it up, left, right or down.

Two Sensors