Skip to main content

Read about the Color Sensor

To learn more about the Distance Sensor, ask the Reader to organize how the group will read the VEX IQ Color Sensor article from the VEX Library. This article will cover how the Color Sensor works and how it can be used.

Program with the Color Sensor

Have the Programmer open VEXcode IQ  and follow these steps:

Test the Color Sensor

Have the Tester connect the VEX IQ Brain to your computer and then follow these steps:

  • Download the project to the IQ Robot Brain.

  • Run the project to report and print if an object is near and if it is, what color that near object is.

  • For help downloading and running a project, view the Download and Run a Project tutorial video.

  • Based on your observations of how the sensor behaved on the Testbed and the information from the reading, answer the following questions and ask the Recorder to document them in your engineering notebook:

    1. Does the Color Sensor report how far an object is using a range of values? Or, can it only report whether an object is detected by using 1 (TRUE) or 0 (FALSE)?

    2. How many different colors can the Color Sensor report to the IQ Brain?

Program the Color Sensor to Detect Brightness

Open VEXcode IQ and follow these steps:

Test the Color Sensor's Ability to Track a Line

Connect the VEX IQ Brain to your computer and then follow these steps:

  • Download the project to the IQ Robot Brain.

  • Find or create a dark/black line on an otherwise clear white/light surface.

  • Position the Testbed so that you can move the Color Sensor back and forth across the line and to the lighter surface a few times.

  • Run the project to report and print if the Color Sensor detects darkness (on the line) or brightness (off of the line).

  • For help downloading and running a project, view the Download and Run a Project tutorial video.

  • With the Brightness project running, face the Color Sensor downward at the line and surface and slowly move it back and forth.

  • Watch the Brain's screen for printed reports.

  • Based on your observations of how the sensor behaved and the information from the reading, answer the following questions and ask the Recorder to document them in your engineering notebook:

    1. In what scenario might you use a Color Sensor to detect and/or follow a line?

    2. In the example project above, when the Brain prints "Off the line," what does that mean in terms of the brightness that it is detecting?