- :-

Topics Covered

  • Rethinking Obstacle Detection
  • Lesson Links

    Check Your Understanding:
    1. 1. Instead of thinking about the four-rotation Obstacle Detection as one big movement, the video suggests thinking about it as...
    2. An impossible task to put into program
      A long series of tiny movements that add up to four rotations
      Running multiple programs simultaneously
      Handing the problem to the next person to figure out
    3. 2. How do continuous decisions allow the robot to watch both sensors at once?
    4. The program resets and restarted at the beginning everytime the readings of any sensor changes
      The robot calculates the path with both sensors at first and runs algorithms for the best way to run the course
      The robot activates a specific sensor at certain times throughout the course
      Every operation is fast, and does not block other commands from running
    5. 3. In the final version of the program, the robot ends up processing the if-else conditional block inside the repeatUntil Loop…
    6. Only once, ever, because it is an If/Else conditional loop
      Four times, because the Loop goes for four rotations
      Thousands of times or more, because the robot processes the loop very quickly and thus encounters the if else conditional loop many times
      The program never worked and requires a revision that is provided in the next video
    Mini Challenge

    Mini Challenge 1:Obstacle Detecting Until Black Line

    Modify the Obstacle Detection program you wrote so that it will move safely (stopping when an obstacle is in front of it, and moving when there is none)
    until the Color Sensor detects a black line on the table, rather than until the
    robot has traveled a certain number of rotations.
    • The obstacle detecting behavior of the program should stay the same.
    • Instead of stopping after the robot has traveled four rotations,
      have the robot keep traveling until its Color Sensor detects a black line.

    There is a Sensor set in the if-else conditional block, and one set in the repeatUntil Loop. Which one controls the "end of behavior"?

    + hint