Hit a Wall

Assignment

Have your Edison robot drive straight into a wall. When your Edison hits the wall, have it back up, turn and go around the obstacle.

How To

Activate your Edison's obstacle detection using this line of code:

  • Ed.ObstacleDetectionBeam(Ed.ON)

Read of obstacle detection beam using this line of code:

  • Ed.ReadObstacleDetection()

Reading the obstacle detection beam can give you these results:

  1.     Ed.OBSTACLE_AHEAD
  2.     Ed.OBSTACLE_LEFT
  3.     Ed.OBSTACLE_RIGHT
  4.     Ed.OBSTACLE_NONE

You will need a loop that continually uses an if statement to check for the obstacle.