Introduction: Mobile Robotics With Scratch: How to Integrate Scratch, Arduino and Bluetooth
For a long time we struggled with the task of creating a simple, low-cost, platform-independent, reliable and stable strategy of integrating Scratch and Arduino in such a way that you could use Scratch to teach the principles and programming of mobile robots (including cars and walkers) to Middle School-aged kids.
For this strategy, we posed the following requirements:
- Be based upon open and free platforms or at least platforms available at no cost, with an extensive and reliable developers community;
- Run at least on Linux and preferentially on both, PC x86 and Raspberry Pi;
- Support extensible, state of the art Scratch dialects such as MIT Scratch 2 and SNAP!;
- Support the wireless communication with low cost Robotics/Physical Computing platforms such as Arduino using an inexpensive wireless communication channel such as Bluetooth, reliably usable without communication jam in a classroom with at least 15 different groups working on the same time on different projects connecting to at least 15 different computers;
- Be stable and reliable enough to be able to be used in Family Programming Workshops and Middle School Robotics classes;
- Be simple enough to be mastered by schoolteachers with little background in Computing.
The answer to this quest seems to be simple: "Take a computer with a Scratch 2.0 or SNAP! installation, download and install one of various Scratch to Arduino interfaces that are available on the Internet, take an Arduino with Firmata, stick a Bluetooth module on top of it and, wham!, you're running!"
When we started trying, more than a year ago, we soon discovered that, even if the majority of the needed information is more or less available on the Internet, most of the obstacles reside in the details: sometimes a Scratch 2.0 Offline installation on Linux succeeded, sometimes not; Bluetooth communication stubbornly refused to work for a module and, like magic, suddenly worked with another module with exact the same specifications, and so on.
So we decided to be scientific and to go to the ground of each of the problems we encountered, understand and solve them, and produce a set of tutorials that are simple and clear enough for the Schoolteacher with some Computing background or the technology-interested Parent that wants to start teaching visual-programming-based Robotics or Physical Computing to kids using open platforms.
We came up with 4 tutorials that attack each of the major problems we encountered. These tutorials not only describe exactly what is to be done and why, we also discuss when you have to do all steps and when you can leave some out. We additionally explain, in a simple language, why something has to be done in such a way and not differently.
Here they are:
- How to Install MIT Scratch 2 Offline Editor on Linux
- How to Install the Scratch/Arduino Communication
- How to Configure your Bluetooth Module for the Communication between Scratch and Arduino
- Mobile Robotics with Scratch: Preparing your Linux PC, Arduino and Scratch to communicate wireless via Bluetooth
If you want to see what we are doing, we have a blog where we are putting some of the experiments that are resulting from this work. The posts are in Portuguese, but they're full of images and videos that speak for themselves.
Below are two examples of posts of Scratch-driven mobile robots. We built most of them using low cost plastic building kits with big screws. The idea was to test building materials that could be employed in the classroom and that could be handled easily and fast by the kids, in order to allow them to do a little engineering and build the whole models themselves during classes (instead of using ready-to-run robotics platforms with low educational impact). We started with different kits available at eBay and ended with a building material produced specifically for schools called ATTO Educacional:
The intention of this blog is to gather ideas for projects that can be useful in the context of a Robotics class or workshop for kids. We expect soon to have the most promising projects in this category validated with them and on our website.
The Computing at School Initiative
As part of our Computing at School (http://www.computacaonaescola.ufsc.br) initiative, we run family workshops either as part of school programs or independently. The workshops are aimed at children (6-14 years) accompanied by a parent (or any kind of adult family member or friend).
During the workshop participants learn how to implement a little project in Scratch. We choose projects where learning how to program involves simple motion and looks commands as well as events, conditionals, and loops using also sensing commands and operators. While teaching to program, we also present basic computing concepts such as an understanding of algorithmic problem-solving (problem statement, implementation and testing cycle), collaboration in form of pair programming as well as the understanding that a computer program is a set of step-by-step instructions to be acted out.
We also develop instructional units for teaching computing school programs. Currently we are developing an interdisciplinary Scratch game programming 12-hours unit for elementary schools and a 24-hours unit on physical computing with SCRATCH and a low-budget Arduino kit for middle schools.
C. Gresse von Wangenheim, A. von Wangenheim. Teaching Game Programming in Family Workshops. IEEE Computer Magazine, 47(8), August 2014. Also available at [ResearchGate].