Moving Your Robot#

Moving Your Robot

This tutorial walks you through using the drive for block to move your VEX 123 Robot forward and backward in VEXcode 123. By the end, you’ll have a project that drives your robot forward, then in reverse.

  1. Attach two drive for blocks below the when started block.

Two drive for blocks connected below when started.#
    when started
        drive [forward v] for (1) [steps v]
        drive [forward v] for (1) [steps v]
  1. On the second block, change the direction parameter to reverse.

Screenshot of two drive for blocks below a when started block, with the second block's direction dropdown open and reverse selected.
  1. Make sure your robot is connected to VEXcode, then select Start to run the project. The robot will drive forward, then drive the same distance in reverse.

Screenshot of the VEXcode 123 toolbar showing the Connected indicator, with the Start button highlighted.