(Redirected from Turn Motor On for () Seconds (block))

Turn () On for () Seconds
turn (motor v) on for () seconds:: wedo
Category LEGO Education WeDo 2.0
Type Stack
Introduced in 1.4

The turn () on for () seconds block is a stack block and a LEGO Education WeDo 2.0 block. The block activates the LEGO WeDo motor for the specified amount of seconds.

In Scratch 1.4, the block was titled "motor on for () secs", before being renamed to "turn motor on for () secs" in Scratch 2.0, then to its current name in Scratch 3.0.

Example Uses

The block turns the motor on, waits the specified number of seconds, and turns the motor off.

Some common uses for the block:

  • Temporary motor movement
when green flag clicked
turn (motor v) on for (2) seconds:: wedo
  • Controlling how far vehicles move
when green flag clicked
turn (motor v) on for (0.5) seconds:: wedo
  • Keeping a fan on for a limited amount of time
when green flag clicked
turn (motor v) on for (60) seconds:: wedo
  • Turning the fan on for a limited amount of time when (key) pressed
when [space v] key pressed
turn (motor v) on for (10) seconds:: wedo

Workaround

Main article: List of Block Workarounds

The block can be replicated by waiting the number of seconds manually:

turn (motor v) on:: wedo
wait (number) seconds
turn (motor v) off:: wedo

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.