In order to find out why the color sensor reads the colors wrong sometimes, we should first understand how it works:

To access the full video please subscribe to FLLCasts.com
- #1175
- 29 Mar 2019
What is color?
Here is one explanation. Sunlight comes to earth in the form of beams, some of which are long and others – short. We perceive the beams of different length as different colors. For example, when sunlight beams reach an apple, the apple reflects some if the light which we perceive as red.
What kind of a mistake does the color sensor make?
None! The color sensor transforms the light it reads into an electric signal which should reach the robot. When we use longer cables or the battery is running low, the signal weakens. Such a weak signal may disappear while another signal may become so weak that it could be interpreted as another color.
Our tests show that Red, Green and Blue are the most reliable colors when it comes to using the LEGO color sensor.
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons

Robotics with LEGO - Level 3.0 - Security systems
This is the fifth level of the Robotics with LEGO curriculum for students in fifth to twelfth grades.
In this level students will learn how to work with data measured by the sensors. The concept of Algorithm is introduced and the programs perform calculations without knowing the values beforehand. The programming blocks transfer data between each other via data wires. The robots are designed to address the problems of security systems. Variety of alarm systems are built and the physical principles of different security methods are considered.
- 50
- 1:03
- 213

Lesson 7 - Card reader
Introduction
This morning the cake robbers escaped from prison. In order to evade the security system we created, they joined forces with bank robbers who have just been caught thanks to a secret vault door alarm installed in the last bank they attempted to rob. Now, the two gangs are trying to rob all of the bank’s ATMs. It’s time to stop them!
- 6
- 7
- 8
- 3d_rotation 1