Skip to main content

LEGO Education WeDo 2.0

The LEGO Education WeDo 2.0 extension controls a WeDo 2.0 Smart Hub: its motor, light, and the motion and tilt sensors. It is built in and compatible with Scratch.

Load it from Add Extension and choose LEGO Education WeDo 2.0.

Requirements​

WeDo 2.0 connects over Bluetooth, so you need:

  • A computer with Bluetooth and a supported browser.
  • Scratch Link running to bridge Bluetooth to the browser.
  • The WeDo 2.0 Smart Hub paired with your computer.

Adding the extension opens a connection window to pair the hub.

Blocks​

turn [motor] on for [duration] seconds​

Runs a motor for a set time.

turn [motor] on / turn [motor] off​

Starts or stops a motor.

set [motor] power to [power]​

Sets how hard the motor drives.

set [motor] direction to [direction]​

Sets a motor to run this way, that way, or reverse.

set light color to [hue]​

Sets the color of the hub's light.

play note [note] for [duration] seconds​

Plays a tone.

when distance [op] [reference]​

A hat block that runs when the distance sensor reading compares to a value.

when tilted [direction] / tilted [direction]? / tilt angle [direction]​

React to tilting the hub, check its tilt as a boolean, or read the tilt angle.

distance​

A reporter for the current distance sensor reading.

See also​