Follow my Hand

Here is the pseudocode:

As long as the Finch is level:

  1. If the Finch sees something on both the left and the right it should move forward
  2. If there is an obstacle on the right, it should turn right
  3. If there is an obstacle only on the left, it should turn left
  4. If there is nothing detected, it should sit and wait

Can you write the code?

use the light sensor program as a starting point.