We have chosen to use the differential drive as the means of making our robot capable of locomotion. This choice was motivated by the understanding that the differential drive provides unparalleled control over the direction and speed of the robot, and most importantly, allows the robot to turn in its place or rotate without moving forward, which is a feature we desire based on the scenario/functionality we described earlier. I recommend that you read the Differential drive section in Chapter 3, EV3 Brick Programming, if you haven't done so already, before continuing.
Our requirements for the Line-follower robot are simple; we require forward motion and the ability to pivot/turn in place. This is achieved by controlling the two Large Motors independently. The subset of the differential drive controls we will use is given in the following table:
Left motor |
Right motor |
Motion of the robot |
---|---|---|
Stop |
Stop |
Stationary |
Forward |
Forward |
Forward |
Forward |
Reverse |
Spin in place clockwise |
Reverse |
Forward |
Spin in place Counterclockwise |
The preceding table will inform you how to program the robot, in particular, how to write a Java class that models the differential drive and translates the desired type of motion into commands for the left and right Large Motors.
3.145.151.141