Skip to main content
Teacher Portal

Alternate Coding Methods

Adapt this Unit to Use an Alternate Coding Method

This STEM Lab Unit is written for use with the Coder and Coder cards.  However, you can adapt the Labs in this Unit to use VEXcode 123. This flexibility can help you meet the individual needs of your students. For example, if your students are familiar with VEXcode 123, they can complete all the coding activities with VEXcode 123. The Summary section of each Lab contains additional information that can help you modify the individual Lab to use VEXcode 123.

VEXcode 123 Adaptation

If using VEXcode 123 with this Unit, students can use the [Drive for] or [Drive until] blocks to drive the 123 Robot in the coding activities. For more information on how to work with VEXcode 123, see the VEXcode 123 Section of the STEM Library.

VEXcode Block Behavior
VEXcode block that reads drive forward for 1 step. The [Drive for] block moves the 123 Robot forward or in reverse a given distance. Set how far the 123 Robot will move by entering a value into the oval.
VEXcode block that reads drive forward until object. The [Drive until] block moves the 123 Robot forward or in reverse until the Eye Sensor detects an object.
VEXcode block that reads eye detects red. The <Eye detects> reports if the Eye Sensor detects the specified color.
VEXcode block that reads if then else. The [If then else] block is a 'C' Block that runs the blocks inside the first or second parts of the If then else based on the Boolean value reported.
VEXcode block that reads forever The [Forever] block is a 'C' block that repeats any blocks contained inside forever.

 

  • If using VEXcode 123 with this Unit, students can use the [Drive for] block for Lab 1 activities. They can set how far the 123 Robot will move by entering a value into the oval in the Lab 1 Play sections.

VEXcode project with a when started block and 4 blocks attached, the blocks read as follows: drive forward 2 step, drive forward 1 step, drive forward 1 step, drive forward 1 step.
Possible Solution for Drive to Grandmother's House Project in Lab 1, Play Part 2
  • Students can use the [Drive until] block in their projects for Lab 2. They can use this block to have the 123 Robot drive until it detects either Grandmother's house in Play Part 1, or the Wolf in Play Part 2.

VEXcode project with a when started block and 2 blocks attached, the blocks read as follows: drive forward until object, play sound honk.
Possible Solution for the Scare Away the Wolf Project in Lab 2, Play Part 2
  • In Lab 3, students can use the [If then else], <Eye detects>, and [Forever] blocks in order to create the 'Wolf Detecting Algorithm'. Note that the [Forever] block contains all of the other blocks within. That is what determines what blocks will be repeated.

    VEXcode project with a when started block and 6 blocks attached. A forever loop is around the following blocks: drive forward until object, if eye detects red then play sound honk, else play sound doorbell.
    Possible Solution for the 'Wolf Detecting' Algorithm Project in Lab 3, Play Part 2