- :-

Topics Covered

  • Wait for Color Block
  • Lesson Links

    Check Your Understanding:
    1. 1. What does this program do?
    2. Wait for the Color Sensor to see a Red object, then move forward
      Wait for the Color Sensor to see a Green object, then move forward
      Wait until an object is moved out of the way, then move forward
      Move forward until it sees a Green object
    3. 2. When multiple colors are checked in the "Set of Colors" area, what will the Wait Block do?
    4. Wait for ANY of the colors to be seen
      Wait for ALL of the colors to be seen at the same time
      Wait for ALL of the colors to be seen at least once each
      Wait for ALL of the colors to be seen in the order indicated by the numbers
    Try It!
    The EV3 Color Sensor can detect 7 different colors, plus the absence of color.
    Each of these 8 colors is labeled with a different number.
    Try it! 1

    No Color

    What does the No Color "color" mean in the Set of Colors menu?
    Change your program so that it waits for "No Color" (Option 0). Make sure you unselect all the other colors.

    Place various objects in front of the Color Sensor, and run the program.
    What triggers the Wait For No Color Block? Try it!
    What happens?
    The "No Color" option is triggered when there is no object
    in front of the Color Sensor!

    Note that "No Color" is not the same as Black or White!
    It really means NO COLOR is being detected!
    Try it! 2

    Port View: Color Sensor Values

    You can see the Number value of the currently detected color directly on the EV3's viewscreen,
    in the Port View Mode.
    1. Use the Left and Right Buttons on the EV3 to navigate to the EV3 Apps menu (), and press the Enter Button to select 'Port View Mode'.
    The 8 blocks at the top and bottom of the screen represent the 8 ports on the EV3.

    - Motor Rotation Sensor values are displayed across the top.
    - Sensor Values are displayed across the bottom,
    depending on what is plugged in.

    2. Use the Left and right Buttons so that the Color Sensor's Port View block is selected.

    "COL-RELECT" means the sensor is reading amount of colored light being reflected.

    This is not what we want, since we want to see exactly what color the sensor is seeing, not the amount of color.

    3.Press the Enter Button on your EV3 while the Color Sensor's Port View block is selected.
    Move the Up and Down Buttons to select the type of reading 'COL-COLOR',
    and press the Enter Button to set new reading type.
    4.Now the Color Sensor's Port View will display the color value. ('COL-COLOR')
    1. 1. Point the Color Sensor directly at the Red side of the Color Crate.
      What value do you see?
    What happens?

    The number 5 appears, representing Red.

    1. 2. What value should you see if the Color Sensor is pointed
      at the Blue side of the Color Crate? Try it!
    What happens?

    The number 2 appears, representing Blue.

    1. 3. Point the Color Sensor away from the Color Crate and any strong lights.
      What reading does it give? Try it!
    What happens?

    The number 0 appears, representing No Color Detected..

    Mini Challenge

    Mini Challenge 1: Railroad Crossing

    Instead of red and green lights, some traffic signals simply use signs
    that raise and lower in the path of traffic.

    Program your robot so that instead of waiting for a green light, it waits for the red stop sign to be taken away.

    Did You Know?

    Did you know?

    How the Color Sensor Works