Skip to Content

Physical-Digital Chain Reaction using WeDo Robotics with Scratch

Create a Rube Goldberg style chain reaction, using Scratch, LEGO WeDo, rubber balls, duct-tape, and anything else you can find.

Making Rube Goldberg machines - contraptions in the physical world that perform simple tasks in complex ways - is really fun. We wanted to try using WeDo and Scratch to make a chain-reaction that crosses the boundary between the physical and virtual worlds. It turns out to be an interesting theme for a Scratch / WeDo workshop!

Here’s a video that shows the basic concept:


Here’s how it works: Something from the physical world triggers a sensor on the WeDo, which kicks off a chain reaction within the virtual world of the Scratch project. At the end of that virtual chain reaction, the WeDo motor is activated, which continues the chain reaction in the physical world. That triggers the next WeDo / Scratch project on the next laptop, on and on for as many links as you have in the chain.


Ingredients for this workshop:

Scratchers with some experience

This workshop is challenging, so if your participants don’t yet know how to Scratch, you’ll need to bring them up to speed. At a minimum, you’ll probably need at least several hours to introduce the basic concepts of Scratch, and another hour or so of WeDo introduction before diving into this activity.

1 Laptop / LEGO WeDo for every 2 participants 

Since each computer receives physical input from the left, and provides physical output to the right, it’s helpful if you can place them relatively close together to form a line or a circle. Laptops are a must, unless you have tons of craft materials that work well for spanning the long distances between desktop computers.

Craft materials

It’s easy to make digital contraptions inside of Scratch, because everything inside of Scratch is free! But physical-world contraptions require physical-world materials, like: cardboard tubes, pipe cleaners, balls small and large, hot-glue, duct-tape, dominoes, sticks, etc. Gather anything that your participants might be able to use to cobble together something that is kicked off by a WeDo motor on one end, and triggers a WeDo sensor (either the distance sensor, or the tilt sensor) on the other. You can use the LEGO bricks that come with WeDo, but the more other stuff you can add into the mix, the merrier.


Running the workshop:

Start off by having participants pair up two to a computer / we do kit, positioned roughly where they'll be building their chain reaction. Now have one of them start a test-run by hi-fiveing the person to their right. The receiver of the high-five passes the high-five to the person to their right, on and on for each link of this human high-five chain. This is a good thumbnail sketch of what the workshop is about.

Next, demo your own example of a Scratch / WeDo Physical / Digital chain reaction to the group (or show the video above).

Explain the responsibilities of each link:

1. Set up a sensor that gets triggered by the link to your left.

2. Make a project that does something awesome when triggered, and then...

3. Trigger the team to your right using the WeDo motor.

Each 'link' (2 participants with a laptop and a WeDo kit) will have to coordinate with the links to their left and right to come up with a good way to receive and pass on the trigger.


Triggering with WeDo sensors, and activating the WeDo motor 

Your participants should already have some WeDo experience, but even so this would be a good time for a refresher. Here are some examples scripts that may come in handy.


a. This one makes the script wait until the distance sensor reports a value lower than 10 (i.e. when something is about 3 cm, or less, from the front of the sensor). This might be useful if they want to trigger their Scratch project when a ball rolls in front of their distance sensor.


b. This waits until the tilt sensor reports a value other than 0 (meaning, when the tilt sensor gets tilted in any direction). They might use this if they are planning on triggering their project when something knocks over their tilt sensor. 


c.  This block will activate the WeDo motor in order to kick something off that will end up triggering the next link in the chain.


Let them loose!  Give them an hour and 20 minutes to work on their links while you wander around answering questions, brainstorming ideas, and helping people get unstuck.  Encourage those who make quick progress in the physical world to invest more energy in making a creative animation in the virtual world of Scratch.

Next declare a (non-final) test run. This will illustrate all sorts of problems that no one could have predicted, so give them another 15-30 minutes to fix these, and prepare for the final run. (Note - when debugging sensing / triggering in the physical world, it can be helpful to temporarily remove the scripts that play the virtual bit, so each test can be done more quickly.)

This makes for really fun videos, so be sure to have someone on hand to film as the stimulus crosses from the physical world, onto the Scratch screen, and back into the physical world. Please post a link to your video in comments here!

Here's are some pics and a video we took of our first run of this workshop. Thanks to all the nice folks at LEGO who helped us pioneer this idea!


Extra Variations / Challenges:
1. Make the links of the chain go around in a complete circle. Make physical connections that reset themselves automatically, so your stimulus can go around and around the circle forever. Challenging!!

2. Figure out a way to pass messages typed on the first computer all the way to the last computer in the chain using physical / digital chain reactions. Super challenging!!