Skip to main content

Draw-to-code

Use Draw-to-code if you want the simplest way to create robot movement.

Instead of writing code, you draw a path, and the robot follows it.

This is a good starting point for younger students, beginners, and quick classroom activities.

In the drawing area, you can draw a path. The robot can then follow that path.

You can use Draw-to-code to make the robot:

  • drive forward
  • turn
  • follow a simple route
  • stop at certain points
  • perform actions at selected points

Moving around the drawing area

In the drawing area:

  • drag with one finger to draw
  • use two fingers to zoom in or out
  • use two fingers to move around the drawing area
  • drag points on the path to change the shape

Editing lines

When you tap a line, you can change how the robot drives along that part of the path.

For example, you may be able to adjust:

  • speed
  • acceleration
  • direction
  • whether the line should be removed

Editing points

When you tap a point on the path, you can change what happens at that point.

For example, you may be able to:

  • adjust turning speed
  • adjust turning acceleration
  • delete the point
  • add a robot action at that point

A point can be used to make the robot stop, turn, move its arm, play a sound, or show something on the screen.

Drawing options

The toolbar gives access to additional options:

  • show measurements
  • show or hide the grid
  • change direction
  • clear the drawing

Direct control during coding

If the robot is far away from you, you can use the driving arrows to drive it closer.