Lesson: Exercise: Using an Optical Distance Sensor

Overview: 
Explore using the Optical Distance Sensor device to gather information about the robot's environment.
Objectives: 

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

Content: 

Modern Robotics has an Optical Distance sensor designed for use with the Tetrix control system. This sensor can read the distance to a surface when the surface is within 15 centimeters of the sensor. The FTC SDK has a sample program you can use to experiment with the Optical Distance sensor. In AS, open the path FtcRobotController/java/[first package]/external.samples/SensorMROpticalDistance. You can enable this program and work with it but any changes you make will be overwritten at the next update of the SDK. You can copy the class to the teamcode area so any changes you make will be retained.

Here is a detailed discussion of the Optical Distance sensor on the Modern Robotics website. There is a link on the page to programming information. This is recommended viewing.

Lesson navigation: