Teacher Version

Hero Image
Hero Image

Backward Until Far

How do we move until far?

In the program shown in the Forward Until Near video, the robot will move forward until it detects a wall or object within the set threshold. Now, perform the opposite. Create a program that makes the robot move backwards from a wall or object until it is beyond the set threshold.

Virtual Robot: MoveUntilFarVR.rbg

Physical Robot: MoveUntilFar.rbg

Setup:

  • Place the robot with the distance sensor near a wall.
  • Program the robot to back away from it until it is 30 cm away.

Quick Tips

Use these hints below to help you solve the challenge.

  • Remember that negative motor power makes the robot move backwards.
  • The distance will start below the threshold (closer than 30 cm). You will need to back up until the distance is greater than the threshold.

© 2016 Robomatter, Inc.

Portions of this product are manufactured under license from Carnegie Mellon University.