Turn Motor Off (block)

Archive.png
The subject of this article or section has changed dramatically and requires updating. Please keep in mind that some of the information or images may not be accurate or relevant to the current version of Scratch, the Scratch website, or the article subject. (October 2016)
Document.png Please expand this article or section. You can help by adding more information if you are an editor. More information might be found in a section of the talk page. (January 2016)
Turn Motor Off
2.0 Turn Motor Off.png
Category LEGO WeDo
Type Stack
Introduced in 1.4

The Turn Motor Off block is a LEGO WeDo block and a Stack block. The block deactivates a LEGO WeDo motor.

An example of the block in action.

Prior to Scratch 2.0, this block was named Motor Off.

Example Uses

  • Stopping a vehicle

when green flag clicked
set [gas tank v] to [full]
wait until <(gas tank)=[empty]>
turn motor off::extension
say [Oh no! My car's all out of gas!] for (5) secs

When I receive [Rollercoaster v]
reset timer
repeat until<(timer)>[60]>
wait (3) secs
say (item [random v] of [Rollercoaster sayings v]
change [power v] by (-5)
set motor power (power)::extension
end
turn motor off::extension
say [That was a fun ride!]
  • Stopping a fan

when I receive [stop fan v]
say [I'm cold. I'm going to turn off the fan.]
glide (1) secs to x:([x position v] of [Fan v]) y:([y position v] of[Fan v]
turn motor off::extension

  • Stopping gears, therefore stopping a machine

when I receive [gear clog v]
set [brightness v] effect to (-30)
turn motor off::extension

Workaround

Main article: List of Block Workarounds

This block can be replicated with the following code:

turn motor on for (0) secs::extension

Or, this can be used:

set motor power (0)::extension

See Also