Line Robot - Basic lessons - Motors
The robots features 2 pairs of wheels, left and right pair. We can manage its trajectory by forcing the pairs to move with different speeds. The command that accomplished that is
go(leftWheelsSpeed, rightWheelsSpeed), where
leftWheelSpeed and
rightWheelSpeed are speeds of the 2 pairs. For example,
void RobotLine::loop() {
go(50, 50);
}
will drive the robot straight ahead as both pairs have the same speeds (50).
Task: circular motion
Write a program that will be moving the robot in a circle clockwise.
Solution
void RobotLine::loop() {
go(60, 20);
}