Ops Manager Learn 4: Turn a Corner

2. Planning

Let’s plan out our line following strategy. We must consider how we want to react to each possible response value that can be returned by the position() function. 

      1. If the line is centrally located, we simply continue on our path.
      2. Where it isn’t, we steer towards the line to return it to the central position.
      3. If we cannot see a line then we’re “flying blind” and we should simply stop.

The last rule is a fail-safe.