- :-

Topics Covered

  • Loops
  • Lesson Links

    Check Your Understanding:
    1. 1. What does the Loop do?
    2. Send the program "flow" back to an earlier point in the program, causing it to repeat some instructions
      Choose between two different possible sets of commands to run
      Repeat a branching decision quickly, to enable continuous control of the robot
      Run all the programs on the robot in a continuous cycle
    3. 2. How do you add a Loop to a program?
    4. Click the Loop Block, then drag a box around the commands you want to put inside the Loop
      Select the blocks you want to put inside the Loop, then right-click and choose "Place in Loop"
      Right-click in an empty area and choose "Make Loop" from the menu that appears
      Drag a Loop into the program, then drag commands into it
    Mini Challenge

    Mini Challenge 1: Square Lap 1

    Program a Looped behavior that makes the robot travel around a square box forever.

    Mechanical limitations will prevent the robot from staying on course forever.
    Complete at least one full lap to complete the challenge!

    Use lower speeds to stay on course as long as possible.

    You can also try to add Wait Blocks inside of Loops.

    + hint