- :-

Topics Covered

  • Bumper Switch
  • WaitUntil Command
  • Lesson Links

    Check Your Understanding:
    1. 1. True / False: The waitUntil command tells the robot to wait for a condition to be met.
    2. True
      False
    3. 2. True / False: Double equal signs (==) in ROBOTC mean make two things equal.
    4. True
      False
    5. 3. True / False: The bumper switch returns two values to the robot, pressed or not pressed.
    6. True
      False
    7. 4. If the bumper switch has a value of zero, it means which of the following?
    8. The bumper switch is not working
      The bumper switch is not pressed
      The bumper switch is pressed
      The bumper switch is out of batteries
    Did You Know?

    Did you know?

    Boolean Logic

    Did you know?

    Sense, Plan, Act Concept

    Sense, Plan, Act was an early robot control procedure commonly abbreviated SPA. Today we use its fundamental concepts to remind us of the three critical capabilities that every robot must have in order to operate effectively:

    The robot needs the ability to sense important things about its environment, like the presence of obstacles or navigation aids. What information does your robot need about its surroundings, and how will it gather that information?

    The robot needs to take the sensed data and figure out how to respond appropriately to it, based on a pre-existing strategy. Do you have a strategy? Does your program determine the appropriate response, based on that strategy and the sensed data?

    Finally, the robot must actually act to carry out the actions that the plan calls for. Have you built your robot so that it can do what it needs to, physically? Does it actually do it when told?

    Did you know?

    How the Bumper Switch Works?
    When the bumper switch is pressed, it closes an electrical circuit, allowing current to flow.
    If the bumper switch is released, the circuit is broken and no current flows.

    The flow (or lack) of current is detected by the VEX IQ, allowing it to determine if the Bumper Switch is pressed.
    Try It!
    Try it! 1

    Sense, Plan, Act Concept

    Take a look at the following program:

    On a separate sheet of paper, determine the Sense, Plan, and Act concepts in the program.

    Try it!
    Try it! 2

    Forward Until Release

    Start a new program, program that has the robot run until the bumper switch is released instead of until the bumper switch is pressed.

    What changes are needed?

    Try it!
    What Happens?

    This means that the robot should move while the value of the bumper switch == 1

    To run the program, you can have the robot push a box off the table or run the program while manually pushing the bumper switch.

    Bumper switch - Mini Challenges

    Mini Challenge 1: Hub Drill

    The robot should start in the middle of the challenge table. The robot travels forward and stops when it reaches the wall and the bumper switch is pressed. The robot then returns to the middle of the challenge table.

    Next, the robot should make a 90 degree right turn and move forward until the bumper switch is pressed again. Then, it will again return to the middle of the challenge table.

    This process is repeated until the robot has touched all four walls on the challenge table.
    • On a square table, create a 2' x 2' box in the center of the table, then have the robot start in the middle of the box (1). The robot will move forward to touch the wall (2), then return to the hub, then repeat the bahavior on the rest of the walls (3).

    Mini Challenge PDF[ Hub Drill Challenge.pdf ]

    Mini Challenge 2: Shifting Maze Hands On

    This challenge asks the user to program the robot to move from its starting area through a maze with tall, vertical walls. The walls in the maze can be adjusted so the robot needs to rely upon sensor input in order to be able to navigate successfully through the maze.

    With the Hand On challenge, the robots are allowed to bump into the walls. The robot should make one pass through the maze.

    Then, the walls that are designated to be adjusted should be moved. The robot should be able to run the same program and be able to successfully run through the maze a second time.

    The pattern of the turns that the robot needs to complete does not change when the walls move. Therefore, the programming of the turns does not need to change.
    • On a square table, have a starting and ending areas on the table, along with tall objects to serve as obstacles. The robot will move from the start (1), and navigate to the end (3), using its bumper switch.

    Mini Challenge PDF[ Shifting Maze Hands On Challenge.pdf ]