The Coding Fundamentals Unit will familiarize you and your students with the foundational concepts of computer programming. Students will be learning terminology associated with robot behaviors, decomposition, sequencing, and troubleshooting (debugging). Students will use this language as they engage in guided explorations, investigate the basics of coding, and problem solve challenges using the 123 Robot within the classroom.
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|
How is sequencing used in this Unit?
Sequence is the order in which Coder cards are executed in a project. The Coder cards run beginning with the card inserted at the top of the Coder, then moving down one at a time. In Lab 3, students will sequence Coder cards to create a project that has the 123 Robot move from one location to another as determined by the Map Challenge Prompts. If the students do not have their cards in the proper sequence, then the 123 Robot will be unable to reach the destination on the prompt.
In this animation, you can see how the project starts with the "When start 123" card at the top of the Coder, Then, each Coder card is executed in order from top to bottom. The green Highlight Feature on the left of the Coder indicates which individual coder card is running at the moment. This can provide students with immediate feedback to connect the behaviors of the 123 Robot with specific Coder cards.
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 a specific location on the map, 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 in a Coder card project.
Steps for planning and sequencing Coder cards in a project
Project planning requires students to identify the 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 Coder card behaviors, they will sequence the cards to build their project, and insert them into the Coder. 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, drive from the park to the house on the map.
- Then, break down the steps needed to accomplish the goal, and identify the Coder cards needed to accomplish these steps. Here you will need to first drive forward for three steps. Then, turn right. And finally, drive forward one more step to reach the house. This can be accomplished with three 'Drive 1," a "Turn right," and a "Drive 1" card.
- Note: there is more than one way to achieve the goal of reaching the destination, For example, students can use a "Drive 1" card and a "Drive 2" card instead of three "Drive 1", or they may choose a different path to the house. The important thing is that they break down the steps for their solution, and match those steps to Coder card behaviors.
- Next, plan the sequence of the project by laying out the Coder cards on the table. Once you are satisfied with the project plan, insert the Coder cards into the Coder beginning from the top and working down.
- Select “Start” to test the project and see if the 123 Robot accomplishes the goal identified in the first step.
If you want to change your project, simply remove the Coder cards from the Coder, rearrange the cards, and insert them back into the Coder to update your project.
Strategies for Teaching with the Coder in this Unit
The Coder offers an opportunity for students and teachers to engage with and share code easily, and tangibly, throughout a Lab’s activities.
Supporting pre or early readers — Coder cards are designed to support pre-readers, or early readers, using icons to represent the words of the card itself, so students can essentially read the images, if they cannot yet read the words. Encourage students to use these icon images to help them as they work to build their projects. Reinforce this by referring to the images on the Coder cards when you are naming them with students, like “The When start 123 Coder card, the one with the green arrow, always goes first.”
Check and Share code easily — Once Coder cards are loaded into the Coder, students can hold up their Coder to show their code, just as they would hold up a whiteboard with a math solution on it. Use this strategy during group instruction as a means for checking students’ accuracy before they start their projects. You can quickly and easily see if the correct Coder cards are used, if they are inserted in the correct order, and make sure that they aren’t upside down or backwards. When checking in with groups to facilitate independent activity, look to the Coders and Coder cards to check progress.
What Coder Cards Do You Need?
Coder cards represent 123 Robot commands that are inserted into the Coder and used to code the 123 Robot. Below is a list of the main Coder cards used during this Unit. See the Environment Setup section of the Summary in each Lab for more detailed information about organizing and distributing Coder cards to your students.
|Starts the project when the ‘Start’ button on the Coder is pressed.|
|123 Robot will drive forward for 1 robot length, or 1 square on the 123 Field.|
|123 Robot will drive forward for 2 robot lengths, or 2 squares on the 123 Field.|
|123 Robot will drive forward for 4 robot lengths, or 4 squares on the 123 Field.|
|123 Robot will turn in place 90 degrees to the left.|
|123 Robot will turn in place 90 degrees to the right.|
|123 Robot will turn in place 180 degrees to the right from its starting position.|
Additional Coder cards from the Sound, Action and Looks categories will also be used to experiment with Coder card behaviors in Lab 1, and for the debugging projects in Lab 4. Examples of these cards include "Act Crazy" from the Action category, "Play honk" from the Sound category, and "Glow purple" from the Looks category. For a full list of Coder cards and their behaviors, see the VEX Coder Card Reference Guide Knowledge Base article.
Troubleshooting with the Coder
Coding with the Coder and Coder cards inevitably requires some troubleshooting and debugging. While this is a valuable part of the learning process, here are some solutions to the most common issues you may come across in this Unit:
- The Coder cards fall out when moving the Coder — When having students hold up their Coders with Coder cards in them, remind them to hold it up straight, and not to tip it sideways. If tilted to the right (or the open side of the Coder), the Coder cards can fall out. Since left and right are not always reliable for young students, encourage them not to tilt the Coder in any direction.
- A Coder card is oriented incorrectly — Remind students to make sure that their Coder cards are inserted in the correct orientation - with the words and images facing them, and the pictures on the right (or open side) of the Coder. If cards are upside down or backward, have students pull them out and reinsert them in the correct direction.
- A Coder card slot displays a red light when running — If a red indicator light appears beside a Coder card, the Coder card may not be inserted completely into the slot. Remind students to push the Coder cards all the way in, or to take out and reinsert them, if this occurs.
For more information about the Coder, see the Using the VEX 123 Coder Knowledge Base article.