Lesson: Exercise: Using a Gyro

Explore using the Gyroscope Sensor device to gather information about the robot's environment.

Understand how to use the Gyroscope Sensor to gather information about the robot's environment.


Modern Robotics has an gyroscopic sensor designed for use with the Tetrix control system. This sensor can return heading and rate of rotation information. Here is a detailed discussion of the Gyro sensor on the Modern Robotics website. There are links on the page to programming information. This is recommended viewing.

Below is a simplified sample program that uses a gyro to drive in a straight line and avoid obstacles by backing up from contact with an obstacle and turing 90 degress and resuming driving in the new direction. You can paste it into AS and experiment with it.