There are many introductory educational robotics activities for Lego platforms that deal with the basic capabilities of a robot, namely to move using motors and perceive something from its environment using sensors. They usually involve building a simple model using ready-made instructions and creating a simple program that is tested for effectiveness.
In this case, the inspiration for the story of the activity comes from Graeme Faulkner. Aliens have descended on our city and we are asked to build a robot that will visit them and greet them so that we can understand their moods.
Our main goal is to program a robot to move certain distances and then change the program to use the distance sensor (ultrasonic) to stop in front of obstacles. I have implemented this specific activity several times with variations and different platforms (Lego NXT, Lego Wedo and Wedo2, Lego EV3, Lego Spike Prime). The following description is based on Lego Spike Prime.
We give each group the following worksheet without any introduction and ask the children to read the first paragraph. We can be a bit conspiratorial for a while and argue that aliens really have come and the Mayor not knowing where to turn has come to us who know about robotics.
The main activity consists of four steps. In the first two students build the robots and alien models which can be done in parallel within each group.
- In the first step, students build alien models from paper, cups, etc.
- In the second step, students build the robotic model. We want something fairly simple that can move and have the ability to add the distance sensor. One such case is the Basic driving base 2 from the Lego Spike Prime platform.
- In the third step, we ask the student teams to program the robot so that it can approach the alien (we don’t use any sensors yet) and smile (with the screen) showing a welcome message. We do not give many instructions and ask the children to experiment with the movement commands that the platform has. Some activate the motors for a specific time, while some also calculate the centimeters. Each team has rulers at its disposal to measure the distance between the robot’s initial position and the alien’s position.
- In the fourth step, we remove the fixed position of the alien on the track and inform the teams that the aliens will change position every time they run the program (we will place them wherever we want). So they will need to follow the vague instructions on the worksheet to find a solution.