(Redirected from Lego WeDo)

SandCastleIcon.png This article has links to websites or programs outside of Scratch and Wikipedia. Remember to stay safe while using the internet, as we cannot guarantee the safety of other websites.
"LEGO WeDo" redirects here. For the extension, see LEGO Education WeDo 2.0 Extension and LEGO WeDo 1.0 Extension.
A LEGO WeDo robot being used with Scratch.

The LEGO WeDo Construction Set is a simple robotics tool designed for ages 7–11. It allows users to design their own interactive machines and program them using drag-and-drop software like Scratch.

As of October 2016, there are two versions of the LEGO WeDo: 1.0 and 2.0. The main difference between the LEGO WeDo 1.0 and LEGO WeDo 2.0 is that the 2.0 version connects over Bluetooth to Scratch.

In Scratch 3.0, one can add the Wedo 2.0 extension by clicking the blue button below the block categories. The 1.0 version is no longer supported and can only accessed with older versions of Scratch.

LEGO WeDo Parts

WeDo part What it Looks Like (WeDo 1.0) What it Looks Like (WeDo 2.0) What one can use it to do
Motor Legomotor.jpg LEGO-wedo-2-motor.jpg Make things turn and power wheels.
Light LEGO-WeDo-light.png LEGO-WeDo-light.png These are LEGO Power Function lights that are not included in the WeDo kit, but can still be connected to the WeDo hub and controlled using Scratch.
Distance sensor LEGO-WeDo-distance-sensor.jpg LEGO-wedo-2-motion.jpg Interact by moving closer and further from this sensor.
Tilt sensor Tiltsensor.jpg LEGO-wedo-2-tilt.jpg Interact by tilting this sensor.
Hub Legowedohub.jpg LEGO-wedo-2-hub.png Used to connect the WeDo parts to a computer.

LEGO WeDo with Scratch 2.0

Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.

The LEGO WeDo Construction Kit can be used with the online editor of Scratch 2.0 by adding an extension. The LEGO WeDo extension can be added within the "More Blocks" category. Click "Add an Extension" and choose "LEGO WeDo."

A plugin is needed to use any hardware extension. Once the LEGO WeDo extension has been added, the Tips window will open and give the link to the Extensions installation instructions[dead link].

There is more information about the LEGO WeDo, including sample projects and more detailed instructions on setup, on Scratch here.

Note: Scratch 2 offline editor now supports LEGO WeDo.

Blocks


turn (motor v) on for (1) seconds Turns a specific motor or the lights on for a certain amount of time. There are five options for the block, listed as "motor", "motor A", "motor B", "light" and "everything".

turn (motor v) on Turn a specific motor or the lights on indefinitely.

turn (motor v) off Turn a specific motor or the lights off.

set (motor v) power to (100) This block sets the power of a specific motor or the lights, controlling the speed at which the motor is spinning or the brightness of the lights.

set (motor v) direction to (this way v) This block sets the direction that a specific motor should turn with.

There are three options for the direction, listed as "this way", "that way", and "reverse". The first two are equivalent to clockwise and counter-clockwise. Reverse switches the direction.

MotorMenu.png

All motor blocks have a menu that allows control over two WeDo motors and lights separately. If only one motor is available, use the "motor" option, which will control the motor regardless of where it is connected on the WeDo hub. If two motors are available but need to be controlled separately, "motor A" can be used with one and "motor B" with the other. "light" controls the lights regardless of where they are connected on the WeDo hub. "everything" controls all connected motors and lights.


set light color to (50) Changes the color of the light emitted.

when distance (\< v) (50) This hat block runs a script when the distance becomes less (or greater) than a specified value.

when tilted (any v):: wedo This hat block runs a script when the WeDo is tilted in the selected direction.

(distance:: wedo) This block reports the distance sensor value.

<tilted (any v)?:: wedo> This block reports whether or not the WeDo is tilted in the specified direction.

(tilt angle (up v):: wedo) This block reports the angle at which the WeDo has been tilted in the specified direction (unlike other tilt blocks, "any" cannot be selected here)

LEGO WeDo with Scratch 1.4

Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.
Main article: Motor Blocks
The Motor blocks in 1.4.

To show the blocks to control the LEGO WeDo motors, click "Show Motor Blocks" in the Edit tab. They can be then found at the bottom of the Motion palette. Unlike the LEGO WeDo extension in Scratch 2.0, motor blocks cannot control two WeDo motors separately. Running a motor block will affect all the connected motors.

To report the values of the LEGO WeDo sensors, use the sensor value block, which can be found in the Sensing palette.

See Also

External Links

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