Skip to main content
Teacher Portal

Background

The Touch to Code Unit will familiarize you and your students with fundamental coding concepts using the touch buttons on the 123 Robot. Students will learn terminology associated with robot behaviors, including decomposition and sequencing, and they will use this language as they engage in guided explorations, investigate the basics of coding, and problem-solve challenges using the 123 Robot.

What is a Robot?

A robot is a device that can carry out an action once it is programmed to do so. In Computer Science, a robot is defined as a device that can sense, think, and act. This is commonly referred to as the Sense → Think → Act decision loop.
 

A diagram of the Sense Think Act Decision Loop. Arrows show that the loop is a cycle and repeats. The cycle starts with Sense, described as 'Sense the environment'. Next is Think, described as 'Make decisions based on Sensor data from environment'. Lastly is Act, described as 'Carry out decisions'.
Sense, Think, Act Decision Loop

A 123 Robot uses sensors to collect data from its surroundings (Sense), make decisions based on this information (Think), and turn that information into instructions for behaviors (Act). A device, like a phone, is not a robot because it is unable to act on or within its environment. This ability to act is a key defining feature of what makes something a robot, as opposed to another kind of device.

It’s important to note for students that a robot cannot think for itself, it can only do what it is programmed to do. A robot requires programming, or coding, to be able to act on its environment.

What is VEX 123?

VEX 123 allows children to explore Computer Science concepts, and you, the teacher, to incorporate things like spatial reasoning, coding, and decomposition into a wide array of content areas. VEX 123 offers an opportunity for students and teachers to engage with and share code easily, and tangibly, throughout a Lab’s activities. There are a number of Units and Labs written to give you ideas for ways to use VEX 123 in your classroom, and all of them will include the use of your 123 Robot in a hands-on way. 

Front view of the VEX 123 Robot.
 123 Robot

Teacher Resources are designed to provide you with the structure and support necessary to integrate VEX 123 into your learning environment. These resources will help novice teachers bring technology and innovation to their schools and experienced teachers create the classrooms of the future. Resources found on the 123 Teacher Resources page include:

What is a Programming Language?

A programming language is the mode of communication between a computer and a programmer. Programming languages follow step-by-step instructions that a computer understands in order for its programs to work. Children experience programming languages in early coding by creating simple commands using directional language. Creating these commands requires students to combine communication, thinking, and problem-solving skills. 

The 123 Robot uses touch buttons as commands. Combinations of button presses communicate to the robot what actions, or behaviors, it should carry out. In this Unit, students will use the buttons on the top of the 123 Robot to code the robot to complete challenges. The following table shows you the behavior executed with each of the touch buttons on the 123 Robot.

Button Name Behavior
Start button in the center of the 123 Robot is highlighted. Start Starts the project when pressed.
Move button on the front of the 123 Robot is highlighted. Move 123 Robot will drive forward for 1 robot length, or 1 square on the 123 Field.
Right button on the right of the 123 Robot is highlighted. Right 123 Robot will turn in place 90 degrees to the right.
Left button on the left of the 123 Robot is highlighted. Left 123 Robot will turn in place 90 degrees to the left.
Sound button on the back of the 123 Robot is highlighted. Sound 123 Robot will play a honk sound.

What is Decomposition?

Decomposition involves breaking down a complex problem into behaviors that are more manageable and easier to understand. Breaking the problem down into smaller parts means that each part can be examined in more detail and solved with greater ease. For example, if a student wants their robot to move in a square, they would need to break it down into smaller commands. Refining the breakdown process is important for students to practice, as they may not break down the commands into smaller components at first.

Move in a square breakdown 1 Move in a square breakdown 2 Move in a square breakdown 3
  1. Move forward and turn right four times.
  1. Move forward and turn right.
  2. Move forward and turn right.
  3. Move forward and turn right.
  4. Move forward and turn right.
  1. Move forward 1 step, or one length of the 123 Robot.
  2. Turn right 90.˚
  3. Move forward 1 step, or one length of the 123 Robot.
  4. Turn right 90.˚
  5. Move forward 1 step, or one length of the 123 Robot.
  6. Turn right 90.˚
  7. Move forward 1 step, or one length of the 123 Robot.
  8. Turn right 90.˚

How is sequencing used in this Unit?

Sequence is the order in which commands are executed in a project. Touch button commands are executed beginning with the first button press and run in the order that the buttons are pressed. The table below shows a sequence of button presses to code the 123 Robot to move in a square. The sequence of button presses is from left to right. If the students have not pressed the buttons in the proper sequence, then the 123 Robot will not move as intended.

1 2 3 4 5 6 7 8
Move button. Right button. Move button. Right button. Move button. Right button. Move button. Right button.

Students will need to understand that there is a 1:1 correspondence between a press of a button, and the action of the robot in order to plan their projects. For each press of a button on top of the 123 Robot, the robot will move or turn one unit or play a sound one time. For more information about how to use the Touch buttons on the 123 Robot, see the Coding with the Touch Buttons on the 123 Robot VEX Library article.

Diagram of the 123 Robot showing that one press of the forward button results in one forward movement.
1 Press = 1 Movement

In order to tell a robot exactly and precisely how to move, both decomposition and sequencing are needed. First, the problem, such as how to move to the letters of a word, will be decomposed into smaller increments and behaviors. Then, once these behaviors are identified, they need to be organized into the correct sequence. This is important because the 123 Robot will only move as directed by the touch button presses. In the following animation, you can see the 123 Robot is coded with button presses that drive the robot to the first letter, make it turn, then drive over the letters of the word ‘CAT.’

Video file

Steps for planning and sequencing a project

Project planning requires students to identify the goal for their project, then break down the steps necessary to achieve that goal into discrete steps that can be executed by the 123 Robot. Once they have broken down the steps into Touch behaviors, they will sequence the button presses to build their project. Then, they can then test the project on the 123 Field to ensure that it reaches the goal.

  • First, identify the goal - what needs to be done? For example, have the 123 Robot drive over each of the letters of the word CAT.  

Top down view of the 123 Robot on a 123 Field Tile with the word CAT written on the tile with each letter in its own square. The Robot is in the bottom left corner and the word CAT is written in the middle row above the Robot.

  • Then, break down the steps needed to accomplish the goal, and identify the button presses needed to accomplish these steps. Here you will need to first drive forward for one square to the letter "C.” Then turn right and drive forward one square to drive to the letter “A." And finally, drive forward one more square to the letter “T.” This can be accomplished by pressing the “Move” and the “Turn right” buttons.

Diagram of the process to complete the CAT project. First is the top down view of the field with the word Cat written. Next there are steps to complete it that are written as follows: First, drive forward 1 space. Then, turn right. Then, drive forward 1 space. Finally, drive forward 1 space. After the instructions, each individual button press is shown.

  • Next, plan the sequence of the project. What is the order of the button presses needed to accomplish the goal?
1 2 3 4
Move button. Right button. Move button. Move button.
  • Select “Start” to test the project and see if the 123 Robot accomplishes the goal identified in the first step.

Start button in the center of the 123 Robot is highlighted.