Build a Self Driving Car With the GoPiGo3
8. Take a Test Drive: Drive From John's to Nicole's
In this step, we'll take our first practical journey. We will drive from John's House on the Map, to Nicole's House.
Map Out Our Turns
If we look at the map, we want the robot to start and do the following:
- Drive straight from John's to the first intersection.
- Turn left.
- Drive straight to the next intersection.
- Turn right.
- Drive straight to the next intersection.
- Drive straight until the road ends.
Let's look at this in code.
- GoToTurn
- Turn 90 Degrees LEFT
- GoToTurn
- Turn 90 Degrees Right
- GoToTurn
- Drive until the line follower has no more line (reads all white!)
You can download the code, attached as a bloxter file.