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

Command the Robot

Move the robot Forward, Right or Left, at the specified speed, for the given number of times.

You can also set a series of commands like F 10 100 R 5 10 where the robot moves forward at speed 10, 100 times, then turns right at speed 5, 10 times.

Initially there is a rectangle to steer around, but a flat or hilled track can be selected. Reset Robot puts the robot back at the start position.

The robot can also move/turn the specified distance / angle. Speed / Position control can also be added.

Keyboard controls

Press F R and L to move the robot forward or turn Right/Left; G, S and M to enter the associated time/distance; D the speed.

Z puts the robot at the start position, X at the previous position; I toggles iteration/distance option; C lets you to enter the command string; O instigates the command; W toggles with Control.

P, T and H selects the rectangular path, race track or hilled track

Exercise Tasks

Experiment with different speeds and times and using the Forward button to command the robot to travel from the start position horizontally along the line.

Now try to get the robot to turn right through 90 degrees (we suggest a slower speed).

On the basis of this, type into the command string the commands to go round the rectangle.

Now select a flat track and command the robot to move round it with no control.

Select a hill track - does it still work? If not, try adding speed control (note speed control means that you may need to adjust the time for turning). Can you find a string of commands that work with control on both the flat and hilled track?

Optional: Select Distance not iterations, and try to command the robot round the flat track without control, then with control - and then on the hilled track.

Iterations Not Distance

With Speed/Position Control

Rectangular Path

Flat Track Hilled Track

Robot Speed

>