Set () Direction to ()
set [motor v] direction to [this way v]::wedo
Category LEGO WeDo
Type Stack
Introduced in 1.4

The Set () Direction to () block is a LEGO WeDo block and a Stack block. The block sets the direction that a LEGO WeDo motor should turn with. There are three options, listed as "this way" (clockwise), "that way" (counter-clockwise), and "reverse" (simply switches the direction). It was introduced in Scratch 1.4.

Prior to Scratch 2.0, this block was named Motor Direction ().
Prior to Scratch 3.0, this block was named Set Motor Direction ().

Example Uses

Changing the motor's direction also changes the direction that the LEGO WeDo vehicles move in.

Some example uses for the Set () Direction to () block:

  • Changing a vehicle from moving forward to backwards.
  • Opening and closing the mouth of an animal.
  • Making the LEGO WeDo change direction.
  • Having a model walk or move around, with the legs changing direction.