Rescuer Learn 2: Installing the Distance Sensors

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.

3. DEBUG: I did not see the eyes light up

So you don’t see the eyes light up? Oh dear! You may have mistyped something. Fear not, even the most experienced programmers do this on a daily basis. When this happens, Python has a way of telling us what is wrong so we can fix our code.

You will see a pink box appear under the code cell containing a lot of text. In the programming industry this is called debug information. It tells us about the errors in our code. These errors are known as bugs and the practice of finding and fixing them is called debugging.

The debug information might look a little scary. However, as a user of pre-written functions and classes you can just skip to the last line for a hint. What does the last line of your debug information say?

Below is a selection of the more common things that the last line of the debug information might say when you are trying to initialize sensors and what this is actually telling you about your code.