1, 2, 3, code ! - Cycle 2 activities - Lessons 3.7 and 3.8. Obstacle course for Thymio

Summary

Students must reproduce Thymio's yellow "explorer" mode. First, they write the program. Then, they test their program in a real maze.

Key ideas
 (see Conceptual scenario)

"Machines"

  • The machines all around us simply follow "orders" (instructions)
  • By combining several simple instructions, we can perform a complex task.

"Languages"

  • We can give a machine instructions by using a special language called a programming language, which can be understood by both people and machines.
  • A bug is an error in a program.

"Robot"

  • A robot is a machine that can interact with its surroundings
  • A robot has a computer that decides which actions to take in which situations.

"Algorithms"

  • A test indicates which action to perform when a condition is met.

Equipment

For each group

  • A Thymio robot
  • A computer with VPL software
  • (Optional) Handout 27

Glossary

Bug

Duration

2 one-hour lessons

 

Starting the activity

The teacher reminds the students that Thymio comes with pre-programmed modes. The teacher gives them a challenge: reprogram a similar mode (simplified) to Thymio's yellow mode. The students remember that this is the explorer mode, where Thymio moves forward and avoids obstacles.

 

Challenge: Reproducing an explorer Thymio (in groups)

Depending on how comfortable the class is with the technology and their ages, this challenge can be done in several ways. For more independent students, the teacher can not pass out Handout 27 and simply use it as a cheat sheet. If students need more support, the teacher can give them the handout to give them more guidance.

In groups or as a class, the various stages of programming need to be broken down: what does Thymio do in its default settings? If it detects an obstacle to the right, what does it do? And to the left? And in front of it? VPL is then used to program the robot and test whether the program works by playing with Thymio on the table.

It is very possible that the lesson will be over by the time the programs are written. The "real world" test can then be done during the next lesson.

One example of a correct program is:

 

 

Experiment: A real test for Thymio (in groups)

The class now prepares a huge maze with obstacles that are at least 6 cm tall. All the groups will test their programs at the same time: the robots will interact with the maze and with each other.

If possible, the floor of the maze can be covered with drawing paper: each group can insert a marker in the pen holder on Thymio's cover. This will let them see the paths taken by the different robots during the experiment.

The groups load the program they designed during the previous lesson and let their robot run the maze. They can improve their program as problems crop up: the teacher uses this as an opportunity to introduce the term "bug" to describe the issues.

 

Conclusion and lesson recap activity

The class summarizes together what they learned in this lesson:

  • By combining several simple instructions, we can perform a complex task such as running a maze
  • A bug is an error in a program.

 

 

 


<< Lesson 3.6 Sequence III  

 

Project partners

Aucun résultats