Step 3 – Add Repeating Movement Blocks

Programming the Robot to Move


Now that we have our loops ready to go, let’s add some movement code inside them.

Select

Drag the inside the repeat block.

Drag the underneath the block you just placed.

Change the angle in the to 120.

The turn angle is 120 because 3 repeated turns of 120 degrees makes 360 degrees, meaning the robot will return to its original spot.

Feel free to test out your code at this point. Your robot should be constantly drawing a triangle!

Code Example:


Click to replay

Click to replay