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

Object Tracking

The arena has a large object which the robot should track (keep a constant distance from). You define the robot's motor speeds: use integers as before. You can also set how fast the object moves. Note the object eats the robot if it catches it!

Keyboard controls

Press D to define the motor speeds: tab to the next speed; O to set the object speed.

Use S to start/stop the robot, P to reposition it and W to toggle Reverse Left Motor.

Use I, J, K, M to move the robot Up,Left, Right or Down.

Exercise Tasks

Define the speeds so the robot steers towards the object if it just sees it, but reverses if the object is too close. Does it work ok?

Try with wider beams.

Set the object speed to say 10. Does the robot stay safe?

When Object not seen :

When Object just seen on left :

When Object closer on left :

When Object just seen in right :

When Object closer on right :

Reverse Left Motor

Left motor   Right motor

Left motor   Right motor

Left motor   Right motor

Left motor   Right motor

Left motor   Right motor

Speed of Object

Wider Beams