Programming Lego WeDo 2.0 with Tynker
This is a quick-start guide to program your Lego WeDo 2.0 with the Tynker App.
- WeDo 2.0 – LEGO Education WeDo 2.0 Core Set. At this time, WeDo 1.0 is not supported.
- iPad Tablet – Your iPad must support Bluetooth 4.0 in order to pair with the WeDo. Please see the iOS tablet system requirements from LEGO Education support.
- Tynker App – Make sure you have the most recent version of the app downloaded. Old versions do not have WeDo 2.0 support.
LEGO WeDo 2.0 support is currently only available for iPads through the App Store.
Create Your First WeDo Program
Select the “Workshop” section and start a new blank project. Add an Actor to represent the WeDo. You can do this by selecting “+” to add an Actor, choosing the “Connect Device” category, and selecting the WeDo as an Actor. Once you’ve added the WeDo, you can click on the “Code” button and see that it comes with some initial code.
Connect to the WeDo
Now that you’ve created a Tynker project to control your WeDo, you’re ready to pair your iPad with the WeDo. Your WeDo will pair using Bluetooth.
Simply turn on the WeDo by clicking its on/off button, then wait for it to pair. The pairing should be automatic. Once paired, you will see a green indicator on the WeDo Actor in your Tynker project and the light indicator on your WeDo will be on but not blinking.
If the light on your WeDo is blinking, then turns off, it means that it cannot find anything to pair with. Make sure that your Tynker project with a WeDo Actor is open and check that the iPad is close enough to the WeDo.
Run Your First Program
Place the WeDo on a flat surface with enough space in front of it to move. Click the orange “Play” button on your Tynker project to run the default program. It will show you a screen with an image of the WeDo brick. Touch the image of the brick to make the physical WeDo move.
Program the WeDo
All of the WeDo blocks will automatically appear for your WeDo Actor in the “Library” category of code blocks at the very bottom left of the screen. You can combine them with other blocks, like the “on start” or “when actor touched” blocks, to create programs for the WeDo.
WeDo Program Ideas
Here are a couple of ideas for simple projects that you can make using the Tynker app to program the WeDo 2.0.
This program starts with the “on start” hat block. That means that the code attached to this block will be triggered as soon as you touch the orange “Play” block. Then the code repeatedly changes the light color from 1 (pink) to 2 (purple), with a .5 second delay in between each switch. You need the .5 second wait because otherwise the color would change too quickly to notice.
This program also starts with the “on start” hat block, which will trigger all the blocks attached to it when the “Play” button is pressed. Then it sets the motion sensor to go to its distance mode (as opposed to the count mode, which counts how many times something passes in front of the WeDo’s distance sensor). Distance mode sets the motion sensor to detect how far an item is from the front of the sensor. The project then uses an “if” statement in a “forever” loop to constantly check how far an item is in front of the sensor, then change the pitch depending on the distance.
For more ideas about how to program your WeDo, you can look at the “WeDo 2.0 Controller” project in the “Connected Toys” folder of the Workshop. This advanced project uses buttons that send messages to the WeDo Actor, which in turn controls the physical WeDo device.