- :-

Topics Covered

  • Gyro Sensor
  • ResetGyro Command
  • Lesson Links

    Check Your Understanding:
    1. 1. When using the gyro sensor, one of the first steps in the program should probably be to do this:
    2. Use the setMotorSpeed command to turn one of the motors on
      Use the waitUntil command with the gyro sensor as its condition
      Use the resetGyro command to reset the gyro sensor
      Turn the robot on and off to reset the gyro sensor
    3. 2. True / False: Since the gyro sensor is mounted to the robot's body, the gyro sensor's rotation is the same as the robot's.
    4. True
      False
    5. 3. True / False: In order to make a robot spin in place, the robot's motors should be programmed to move in the same direction.
    6. True
      False
    7. 4. The gyro sensor measures the movement of the robot's body in which of the following?
    8. Seconds
      Centimeters
      Millimeters
      Degrees
    Try It!
    Try it! 1

    Gyro Resetting

    Comment out the "gyroReset" line in the program, and run the program several times in a row.

    Try it!
    What Happens?

    The gyro sensor retains its value between runs,
    so it will still have a value > 90 degrees when the program starts.

    That means the waitUntil command will immediately see a value > 90,
    and go straight to braking.

    The robot will appear to move nowhere,
    because the turn commands had no time to run before the motors were stopped!

    Gyro Sensor - Mini Challenge

    Mini Challenge 1: Gyro Hunt

    Program the robot to utilize the gyro sensor in order to make correct turns and navigate the challenge table correctly.
    • Follow the path laid out on the table below on any surface. The robot will start in one corner (1), then navigate through each point (2), (3), (4), and (5), all the way to the end (6).

    Mini Challenge PDF[ Gyro Hunt Challenge.pdf ]