A one-page guide to getting started with WeDo and Scratch.
Scratch version 1.4 has special programming blocks to interact with motors and sensors in your LEGO WeDo robotic creations.
This guide is intended to be a quick overview of the WeDo components (controller, motor, distance and tilt sensors) and how to control them via Scratch.
- Controller: Connect the WeDo controller to your computer via USB. Start Scratch.
- Motor: The WeDo motor blocks should be visible in the Motion category. If not, select Show Motor Blocks from the Edit menu. You can use the blocks to turn the motor on and off, set the motor power, and set the motor direction.
- Distance Sensor: The distance sensor can be used to determine proximity, where 0 is close and 100 is far. Use the sensor value block in the Sensing category, selecting distance from the pull-down menu.
- Tilt Sensor: The tilt sensor can be used to determine orientation, where 0 is flat, 1 is down, 2 is right, 3 is up, and 4 is left. Use the sensor value block in the Sensing category, selecting tilt from the pull-down menu.