Step 4 – Add Move Away Blocks

Programming the Robot to Move Away


Our next step now is to code the robot to move away from the pattern it has drawn. To do this, we want the code to be outside of our repeat loop.

Select

Drag the below the Repeat block.

Select Black and choose a new color.

Right Click on .

Choose Duplicate from the list that appears.

Drag the Duplicated code underneath the block you just placed.

Change the Drive Block from 200 to 50 .

Change the Turn Block to 11.

Code Example:


Click to replay