Try It Out!

Can you write a program to get Edison to navigate through a maze? To successfully complete the maze, Edison must: 

  • Drive forwards
  • Drive backwards
  • Turn right at least two times
  • Turn left at least two times
  • Use a variable

degreesToTurn = 90 
Ed.Drive(Ed.FORWARD, Ed.SPEED_5, 13)
Ed.Drive(Ed.SPIN_LEFT, Ed.SPEED_5, degreesToTurn) 
Ed.Drive(Ed.FORWARD, Ed.SPEED_5,3) 
Ed.Drive(Ed.SPIN_RIGHT, Ed.SPEED_5, degreesToTurn) 
Ed.Drive(Ed.FORWARD, Ed.SPEED_5, 15)