Ops Manager Learn 4: Turn a Corner

7. Putting It All Together

When everything works as expected, do the following:

          • add the relevant motor instructions in your Main Cell code as per the table above.
          • remove the print statements (they take time and will reduce the efficiency of your function)
          • reduce the sleep time.

      • Place the robot at one end of your test track,
      • Select the Main Code cell,
      • Click on Run Selected Cell.

The robot should now follow the line around the corner.

If it loses the line at any point, the print contrast of your black line may be too low. To fix low contrast problems, try colouring in the line with a black marker pen, re-placing the robot at the start and re-running the code.

The else rule is our fail-safe rule. If it is doing its job as expected, it will stop when it travels beyond the other end of the track.

What do you notice about the way in which the robot follows the line?