m (CrazyBoy826 moved page Turn () On for () Secondss (block) to Turn () On for () Seconds (block) without leaving a redirect: Mistake)
m (Fixed sb)
 
Line 5: Line 5:
 
| type      = [[Stack Block|Stack]]
 
| type      = [[Stack Block|Stack]]
 
| added      = 1.4
 
| added      = 1.4
 +
| sb        = yes
 
}}
 
}}
 
The '''Turn () On for () Secs''' [[Blocks|block]] is a [[LEGO WeDo Blocks|LEGO WeDo block]] and a [[Stack Block]]. The block activates a [[LEGO Education WeDo Robotics Kit|LEGO WeDo]] motor for the specified amount of seconds. It was introduced in Scratch 1.4.
 
The '''Turn () On for () Secs''' [[Blocks|block]] is a [[LEGO WeDo Blocks|LEGO WeDo block]] and a [[Stack Block]]. The block activates a [[LEGO Education WeDo Robotics Kit|LEGO WeDo]] motor for the specified amount of seconds. It was introduced in Scratch 1.4.

Latest revision as of 17:20, 11 February 2020

Turn Motor On for () Secs
turn [motor v] on for () seconds::wedo
Category LEGO WeDo
Type Stack
Introduced in 1.4

The Turn () On for () Secs block is a LEGO WeDo block and a Stack Block. The block activates a LEGO WeDo motor for the specified amount of seconds. It was introduced in Scratch 1.4.

Prior to Scratch 2.0, this block was named Motor On for () Secs, and in Scratch 2.0, it was named Turn Motor On for () Secs.

Example Uses

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

Some common uses for the Turn Motor On for () Secs block:

  • Temporary motor movement

when gf clicked
turn [motor v] on for (2) secs

  • Controlling how far vehicles move

when gf clicked
turn [motor v] on for (0.5) secs

  • Keeping a fan on for a limited amount of time

when gf clicked
turn [motor v] on for (60) secs

  • Turning the fan on for a limited amount of time when (key) pressed

when [space v] key pressed
turn [motor v] on for (10) secs

Workaround

Main article: List of Block Workarounds

The block can be replicated with the following code:

turn [motor v] on
wait (number) secs
turn [motor v] off

See Also