UK Bebras


OUCC Tutorials: blockly turtle [1 of 3]

Tutorials index

Blockly Turtle Tasks

At its simplest Blockly Turtle is very much like the Maze tasks except that the robot can draw as it drives.

Controlling the robot is still done with left, right and forward commands and these commands are still carried out from the turtle robot's persective. This means that a right turn depends on which way the robot is facing in the first place.

The difference with the forward and back commands in the turtle module is that they also require a parameter to say how far the robot is to travel. The turn left and turn right blocks also require a parameter to say how far (in degrees) the robot is to turn.

There are several other blocks available that turn this into a powerful drawing tool. When these commands are combined with other Blockly commands, there is very little that cannot be achieved!

Lets start by drawing a square. First try to do this without using the loop block. Then refresh the webpage and try it again using the loop block and looping four times.

Now explore the examples below to see how to take this turtle to new heights of creativity!

Next >>

Turtle Tutorial Start
Example 1 - Extra turtle commands
Example 2 - Combining turtle commands with the rest of Blockly

Tutorials index