Part 2: Moving
In part 2, we introduce four types of straight line motion:
- Free Motion, motion is primarily controlled by the motors
- Line Edge Following, motion is controlled by a Colour/Light Sensor tracking either the right-hand or left-hand side of a dark line
- Follow a Heading, motion is controlled by the Gyro Sensor – very useful on uneven surfaces.
- Wall Following, motion is controlled by the Ultrasonic Sensor maintaining a constant distance from a wall on either the right-hand or left-hand side of the robot.
But wait, there’s more. In addition to controlling robot motion over a specified distance, we also include the following variations, just in case you want the robot to move to:
- a coloured line
- until it is a specified distance from an object, as measured with an Ultrasonic Sensor
- until the Touch Sensor detects an obstacle
Because sometimes, we can’t just rely on distance alone.