LEGO Education WeDo is counted among the best tools for teaching robotics to children aged 7 to 9. Currently, this set is available on the market in two versions: the “classic” LEGO WeDo from 2009 and its newer version, WeDo 2.0 from 2016. Each set includes a unique assortment of LEGO bricks and several electronic elements: one motor, two sensors and a hub that connects your construction with a computer, or a tablet. Interestingly, it’s the programming software designed for these sets that seems to be the weakest point in this system. The first set comes with a high-quality, but paid software, while the other relies on a free software, but with several shortcomings. Not everyone is aware that an alternative exists – these sets can also be programmed in the internationally known and esteemed Scratch programming language, enjoyed by teachers and students alike. If you want to learn how to start working with WeDo and Scratch simultaneously, read on.
Scratch is a visual programming language often used for educational purposes. Children as young as 8 years old use it to create games, animations, or interactive forms. Programming in Scratch actually means connecting colorful blocks that contain programming commands. Children connect these blocks intuitively and test which connections work – just like when building with LEGO bricks. Thanks to this method, simple programs are created almost organically and each program becomes an inspiration for the next one.
GETTING STARTED WITH SCRATCH
Scratch 2, the most recent version of the software, can be used in two different ways. When using the online version, accessible with the most popular web browsers, you can access Scratch without the need to install anything on your hard drive. You can also choose the offline variant – all you need to do is download it from the official Scratch site and install the software. The second option requires administrative privileges, but we highly recommend it for classroom activities and if you have issues with unstable internet connection. Fans of ye ole Scratch can still use the 1.4 version, but it’s available only offline – you can download it here). It is worth noting that Scratch 1.4 can be installed on the same computer alongside Scratch 2. This solution is especially helpful if you already have a lot of materials for the older version. Despite similar mechanisms, the two Scratch versions significantly differ in graphic design and have several disparate blocks. Therefore, if you plan on using older materials, you should install the appropriate software to avoid unnecessary chaos in class. Presently, all versions of Scratch are available only on PCs. News about a special version for tablets reappears now and then, but so far, it hasn’t left the future prospects category.
If you need some assistance with running one of the above versions of Scratch for the first time, you will find detailed instructions on how to install and run this software below. If you already know how to use Scratch and are eager to find out how to program LEGO WeDo with it, proceed to the WeDo Extension in Scratch section.
Click on the topic to expand step-by-step instructions.
1. When working online with Scratch, there’s no need to install it, just go to www.scratch.mit.edu. You can change your language preferences by using the drop-down list at the bottom of the page.
3. Now you can see the Scratch environment, ready for your newest project. You can program games and animations by connecting blocks from the basic menu. If you want to use Scratch for controlling LEGO WeDo robots, go to the WeDo Extension in Scratch section.
1. To work with the offline version of Scratch 2, you must download and install a suitable app on your computer. The most recent version of the app, 2.0, can be downloaded for free here: scratch.mit.edu/scratch2download/. You need administrative privileges to install it.
2. The Scratch app relies on Adobe AIR (Adobe Integrated Runtime). In case you haven’t installed it on your computer yet, you can download it either from the Scratch website, or from the producer’s site, available here. Select the right version for your operating system, then download and install the plugin.
4. At this point, you can run Scratch offline and start programming games, or animations, by using the standard block selection included in Scratch. You can change your language preferences by clicking the globe icon, located in the taskbar. If wish to use Scratch for controlling LEGO WeDo, proceed to the WeDo Extension in Scratch section.
If you wish to, you may also use the older version of Scratch. The version 1.4 looks slightly different than its successor. Particularly dissimilar are the arrangement of the Stage and the Sprite Panel in comparison to the other interface elements; the colors are distinctive as well. Therefore, if you’re using materials created with the older version of Scratch in mind, you should use the fitting software version. Scratch 1.4 is available only offline.
1. To install Scratch 1.4 on your computer, go to scratch.mit.edu/scratch_1.4/.
2. Download and install the right software version for your operating system. If you are using Mac OSX, download the software from the first link on the page (MacScratch1.4.dmg). If you have Windows operating system in version 2000, XP, Vista, 7, or 8, download the software by using the second link (ScratchInstaller1.4.exe). If you are using Debian, or Ubuntu operating system in the 12.04 version, or a newer one, click on the third link available (you can use Software Center or install the program manually, by using the link below).
3. With the installation complete, you can run Scratch 1.4 on your computer and start programming with the standard Scratch blocks. If you’d like to control LEGO WeDo through Scratch (note that Scratch 1.4 is compatible only with WeDo 1.0!), proceed to the WeDo Extension in Scratch section.
WEDO EXTENSION IN SCRATCH
To start programming LEGO WeDo robots through Scratch, it is necessary to expand the selection of Scratch blocks by those included in the WeDo extension. Depending on the set at your disposal, you will need either the WeDo 1.0 extension, or the WeDo 2.0 extension. If you plan to alternate between sets, you should install both extensions. In Scratch 2, both LEGO WeDo extensions can be installed at the same time. When using Scratch 1.4, you can either content yourself with managing only WeDo 1.0, or upgrade your software to Scratch 2. The extension blocks allow you to manipulate WeDo motor and sensors, which means your code can step beyond the computer screen.
WEDO 1.0 AND SCRATCH
Connecting LEGO WeDo 1.0 with Scratch is somewhat easier compared to the newer version. When you connect the hub via USB, the software detects it automatically. Scratch 2 contains the LEGO WeDo extension in its both versions: online and offline. The older version of this software – Scratch 1.4 – can also be used with WeDo 1.0.
Click on the topic to expand step-by-step instructions.
1. Go to the scratch.mit.edu/wedo/ website.
5. Run Scratch 2 online.
8. After successful installation, the LEGO WeDo 2.0 tell-tale should be yellow, or green in color. Yellow means that the device is not connected to the computer, or that it cannot be detected. Connect your hub to the computer.
In order to program robots created with LEGO WeDo 2.0 in the Scratch 2 offline programming software, you need to install the Scratch Device Manager, just like with the online version. To do it, you must have administrative privileges on the computer you wish to use. You can install the Device Manager by following steps described in the How to add WeDo 2.0 extension to Scratch 2.0 online section. However, in step 5, run the Scratch 2 app installed on your computer, instead of the one available online.
If you want to use the online Scratch version to program WeDo robots, you must add the relevant extension and install a plugin, which will allow your browser to control the set connected to the USB port of your computer. Therefore, preparing the computer room for programming WeDo robots in Scratch requires administrative privileges, regardless of whether you want to use the offline, or the online version.
1. To add WeDo 1.0 extension to Scratch, go to the Scratch editor. In the blocks panel, click the More Blocks category and press the Add an Extension button.
Adding the WeDo 1.0 extension to the offline software is easier, as the extension is installed together with the entire program. So by “adding” the extension, you simply gain access to the part of the software that was already installed.
1. To display the blocks used for controlling WeDo 1.0 elements in Scratch 2 offline, run the app, go to the More Blocks category and choose the Add an Extension option.
Adding WeDo 1.0 Extension to Scratch 1.4 is equally easy. Again, the extension is installed together with the software, but the additional blocks are hidden by default. By “adding” the extension, you simply uncover them.
1. Open Scratch 1.4, click Edit in the taskbar, then select the option Show Motor Blocks.
EXAMPLES OF USE
If you wish to learn how to program LEGO WeDo robots in Scratch, try our RoboCAMP lesson plans. Every lesson plan intended for working with LEGO WeDo contains 12 robots in two versions: WeDo 1.0 and WeDo 2.0, together with programming instructions for WeDo Software and for Scratch. Create a free demo account for access to complete materials to the “Biplane” LEGO WeDo lesson (and much more!).
The short instructions below illustrate how you can use Scratch to program one of the most popular and interesting robots of the LEGO WeDo 1.0 set – the Hungry Alligator. To create the alligator, use the building instructions available together with the WeDo software, or on the producer’s website.
Having built the construction, you can proceed to programming. The objective of the code is to allow the alligator to catch the unwary prey that appears nearby its jaws (alligators can be very patient by nature). The instruction provided below shows you how to program the alligator in Scratch 2, step by step. Click “+” and “-“ buttons to move between the slides. Click anywhere on the picture to play the animation. Have fun!