Lesson: Exercise: Drive in a Circle

Overview: 
Explore making a robot drive in a circle.
Objectives: 

Understand how to make curved turns.

Content: 

Now lets look at an example that drives the robot in a circle. The key idea here is that if you drive the motors in the same direction but at different power levels (speeds) the robot will drive in an arc and if it runs long enough that arc becomes a circle. Here is the code:

Copy and paste this code into a new class called DriveCircle and demonstrate your robot driving in a circle. You will need to adjust the power levels and sleep time to complete the circle. The power levels and time will depend on the motor placement and gearing of your robot.

 

Navigation: