Rescuer Learn 3: Following a Wall

This is the third challenge within the Robotics with GoPiGo and Python Curriculum.

Your task is to design a robot program that can navigate through the maze-like jungle without trampling over any plants or getting stuck in any dead ends.

Learn how to use the Distance Sensor and practice using the left-hand rule of maze-solving.

1. First, init()

Let’s now take your robot for a walk around the block.

First of all, you need to declare and initialize a couple of new global variables that you will be using in this task. They will be explained later on, as you will have need for them.

          • Add the code below in to the Variable Initialization cell.

In the image below, the code in red is the new code to be added. Note that you will not be able to change the color of your own code in your own notebook.