{"id":1034,"date":"2013-09-18T20:44:42","date_gmt":"2013-09-18T10:44:42","guid":{"rendered":"http:\/\/legoeng.local\/?p=1034"},"modified":"2017-12-21T15:27:47","modified_gmt":"2017-12-21T04:27:47","slug":"scratch-ing-the-lego-wedo","status":"publish","type":"post","link":"http:\/\/legoeng.local\/scratch-ing-the-lego-wedo\/","title":{"rendered":"Scratch-ing the LEGO WeDo"},"content":{"rendered":"

I have been Scratch<\/a>-ing with LEGO WeDo kits, and my high school level students absolutely love it. The LEGO\u00ae Education WeDo™ robotics kit is normally ear-marked as an elementary school product, and Scratch was developed by MIT for young children to be able to program, but the combination of the two has tapped the interest of my elementary school daughter, my middle school son, and my Computer Science students at the high school level. Link: https:\/\/scratch.mit.edu\/wedo<\/a><\/p>\n

\"oldLEFTnewRIGHT2013\"<\/a>
Scratch – old and new<\/figcaption><\/figure>\n
\n

LEGO Software is available for younger students, but Scratch programming has inherent drag-and-drop blocks that resemble MIT App Inventor<\/a> interfaces for Android Phones that my advanced students have been using. Directly plug in the LEGO WeDo USB to the computer with pre-loaded free Scratch drag-and-drop the robotics components will automatically appear in Scratch.<\/p>\n

\"LEGO<\/a>
LEGO WeDo USB and the ScratchEd Screen<\/figcaption><\/figure>\n

If you have a motor raising and lowering, you need to put an interface on the screen to explain what is happening, and if the interface is interactive, we are hitting the core-level of robotics understanding that we originally were going over student’s heads with NXTs because the software-hardware-interaction was not immediate.<\/p>\n

An example program I created is called updownduck<\/a> where a physical LEGO Duck is raised and lowered by clicking the words UP and DOWN on the screen. Scratch provides emulators where you can see the screen-programming in action (letters will change colors when you click them), but without the robotic LEGO WeDo motor and duck attached tethered to your computer, the program will not make sense to someone interacting with the screen (I have received comments saying that the program does not work from the sharing-Scratch community).<\/p>\n<\/div>\n

\n
\n
\n
\n
\"An<\/a>
An example program using LEGO WeDo with Scratch called updownduck.<\/figcaption><\/figure><\/dt>\n
<\/dt>\n
<\/dt>\n
<\/dt>\n<\/dl>\n<\/div>\n<\/div>\n
\n

When you view the source code within Scratch (by clicking on the See Inside button), you can understand the purpose of the programming.<\/p>\n

\n
\n
\n
\"Source<\/a>
Source Code for updownduck in Scratch.<\/figcaption><\/figure><\/dd>\n<\/dl>\n<\/div>\n<\/div>\n
The Scratch website also has starter projects and setup instructions on how to use each WeDo Component. These intro projects give easy-to-follow LEGO directions within the Scratch window.<\/div>\n

We modified the motor project to lift a platform of LEGO Men provided from the WeDo kit. Our challenge was to create a way to make sure the platform stops at a safe level without knocking off the LEGO men.<\/p>\n

\"LegoWeDoScratch02-290x300\"<\/a>
Scratch Screen and LEGO Customized WeDo<\/figcaption><\/figure>\n

Complex projects <\/a>were created at the MIT Lab and you can download the Scratch Files:<\/p>\n