SOS coding

Students will explore Otto’s potential to simulate emergency scenarios by coding lights, sound, and motion. They’ll learn the significance of SOS signals and dive into programming their robots to mimic police patrols and ambulances.

Knowledge required

This activity assumes that students already know how to code motors, lights (ultrasonic or color lights) and buzzer components.

Materials required

  • SOS coding slides 
  • Otto Starter robot or only the circuit board with the required components 
  • Computers with internet and/or Bluetooth connection 

Optional materials

  • SOS coding worksheets

Learning Objectives

  • Identify the key components of a robot and explain their functions.
  • Describe the difference between sensors and actuators and how they interact in a robot.
  • Recognize robotic systems in everyday life and be able to reason about how they help.
  • Know that robots use algorithms to perform tasks. 
  • Write and upload programs that control the robot. 
  • Understand key concepts of programming (loops, conditionals, variables, and functions) and apply them to write effective programs for the Otto robot. 
  • Identify the problem to be solved and develop a plan to address it using the Otto robot components. 
  • Use an iterative design process to improve the robot’s performance. 
  • Create a project that combines robotics with another creative discipline. 
  • Explain how the project demonstrates the potential of integrating technology with the chosen discipline. 

SOS Signal

Start the lesson by asking students if they know what the message SOS is. After receiving a few ideas, in the next slide there is a simple explanation about it. Feel free to extend the explanation with new information from sources such as Wikipedia. 

💡 SOS was created as a Morse code signal, this lesson could also be a good opening to talk about this type of code. In the SOS coding worksheets, you will find an activity to engage students with Morse code knowledge. 

Activity: police patrol

Challenge students to make their Ottos to act as a police patrol. The only requirements are: 

  • the robot must move around (it could be in a forever loop or doing a determined route with an ending) 
  • one of the light components (ultrasonic or color lights) must flash intermittently blue and red. 

In the text of the activity slide there is a question ´Could it also sound like a police car when it detects something? This is introduced as an extra challenge for students who complete the activity quickly, to continue exploring the idea of including sound and sensor detection to their code. 

Some pieces of code that can help complete this activity are: 

Police lights in eyes 

Police lights ring 

Police siren sound 

Random movement 

 

By combining and/or modifying these small programs, you can create a single program that makes Otto move by simulating a police patrol. 

See the example in the 13-1_police-patrol.otto file as a reference for a possible combination. 

Activity: ambulance

Challenge students to make their Otto’s to act as an ambulance. The only requirements are technically equal to the police patrol: 

  • The robot must move around (it could be in a forever loop or moving in a fixed route) 
  • one of the light components (ultrasonic or color lights) must revolve around like an emergency light. 

In the text of the activity slide there is a question ´How can your robot know when it reached its destination? This is introduced as an extra challenge for students who complete the activity quickly, to continue exploring the idea of including sensor detection to their code. 

The main code for this activity can technically be the same as the one used for the police patrol, simply changing the way the lights work. Instead of making alternating changes between blue and red, to simulate the ambulance, we can quickly turn the pixels (small LEDs) of the light components on and off. 

With the color ring, we can simply use the cycle effect block with the red color and fast speed:  

Although in this case, our robot will not be able to perform other actions such as moving and sounding while carrying out the light movement animation. 

With the eye lights, we can also turn each LED of each eye on and off independently to create that light movement effect. 

To know when the robot has reached its “destination,” we could place a dark-colored mark on the ground and use the line sensors to stop the motors when detecting the dark-colored mark. We could use a condition like this: 

See the example in the 13-2_ambulance.otto file as a reference for a possible combination. 

Lesson Evaluation

  • Students successfully coded their Ottos to simulate a police patrol. 
  • Students successfully coded their Ottos to simulate an ambulance. 
  • Lesson objectives were achieved as students successfully programmed Ottos to simulate emergency scenarios using lights, sound, and motion. 
  • The teacher confirmed that students understood the significance of SOS signals and were able to apply their coding skills creatively to mimic police patrols and ambulances. 
Nach oben scrollen
Sie werden nach der Produkteinführung verfügbar sein.