- :-

Topics Covered

  • Count Mode
  • Lesson Links

    Check Your Understanding:
    1. 1. A Loop set to Count Mode will send the Program Flow back...
    2. Every time, forever
      Only a limited number of times
      If the Touch Sensor is not pressed when the Flow reaches the end of the Loop
      If there is nothing after the Loop
    3. 2. What does it mean for a Loop to be "Conditional" in the EV3 Programming Software?
    4. It only sends the Flow back under certain conditions
      The entire Loop can be skipped under certain conditions
      The Loop runs faster after it is trained, or "conditioned"
      The code runs every time, no matter what
    5. 3. What is the "condition" in this Loop based on?
    6. The distance the robot has traveled
      The value of the Touch Sensor
      The number of times the Loop has sent the Flow back
      The number of seconds the Loop has been running
    Try It!
    Try it! 1

    Other Counts

    Try changing the number in the Loop's Count setting to 2, then running the program.
    What happens?

    The robot repeats its forward-backward cycle 2 times instead of 5.

    Mini Challenge

    Mini Challenge 1: Square Lap 2

    Program your robot to make just one lap around the box.

    Modify your Challenge program from the "Looped Movement" (previous lesson) section
    so that the robot stops after completing exactly one lap around the box.

    Do not write each movement by hand -- use a Loop!

    Think about how many repeated movements are needed to make 1 square lap.

    For each side of the box, the robot moves forward and makes a right turn.

    + hint