Goal: To move the robot forward.
The movement block in the action window helps you to control the movement of the robot.
This contains 5 blocks.
1) Forward block
2) Backward block
3) Turn Left block
4) Turn Right block
5) Stop block
To move the robot forward use the forward block.
It takes in a parameter speed. Give a constant numeric value between 0 and 255.
Add a delay block, to program for how much time the robot should move forward. If we give a value of 250, it means the robot keeps moving forward for 250 ms and then stops.
Put the logic in a while loop so that, it keeps on moving forward every 250 ms. Complete program is shown below.
Activity: To move the robot in a square path.