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.
8. Sensor Testing - results
In this code you:
- read each of the distance sensors using the distance sensor class library function read()
- add the value reported back to the end of a data list.
Note: The distance sensor reports its values in centimeters.
It also uses a template function written for you called log(). It takes a label and a values list and writes the most recent two readings and the difference between them into the notebook for you. This allows us to see what the robot is measuring as the distance to the nearest wall to its left and in front of it.
If you get any code errors, debug your code and try again. Re-read the debug section above for advice if needed.
Once everything is in order, you should see a stream of left and front distance readings displayed below the code cell (your numbers will be different).