- :-

Topics Covered

  • Motor "On" Mode
  • Forward Until Behavior
  • Lesson Links

    Check Your Understanding:
    1. 1. What does a Move command do when its Mode is set to “On”?
    2. Turn the motors on
      Turn the motors on for a certain number of rotations
      Turn the motors on until the Touch Sensor is triggered
      Combines with the next block to make a special command
    3. 2. What does a Move command do when its Mode is set to “Off”?
    4. Turn the motors off
      Waits for the Touch Sensor to be pressed
      Wait for the Touch Sensor to be pressed, then turn the motors off
      End the program
    Try It!
    Try it! 1

    Forward Until Release

    The Wait - Touch block can wait for the sensor to be "Released" as well as "Pressed".

    What happens if you set the Wait - Touch block to "Released" and run it with an empty box holding down the sensor?

    Note: When setting up robot, have the obstacle place firmly against the Touch Sensor so that it keeps it pressed in, as shown below.

    What happens?

    The robot moves forward until the Touch Sensor is "Released", then stops.

    Mini Challenge

    Mini Challenge 1: Vacuum

    Program the robot to touch all four walls of a room, using its Touch Sensor to know when it has reached each one.

    Use a 4x4 game board and place robot in the middle.
    Program your robot to each all four walls, using its Touch Sensor.

    Change to "Make sure the Touch Sensor is positioned so it can detect when the robot reaches a wall.

    The room is rectangular, so each wall is a 90-degree turn from the last.

    Some fine tuning may help, such as slowing movement speeds, pausing after a turn, or backing away from a wall before turning.

    + hint