lejos color sensor problems

475 views Asked by At

I am currently working on a lejos mindstorms project and trying to utilize the color sensor. The overall goal of the project is to have the robot find a string of christmas lights and follow it. Our test code works with detecting color on regular objects but not on the lights. When I shine the sensor on the lights, all it does is say that the color being shown is black. Is it even possible to read color off a colored light with a color sensor?

1

There are 1 answers

0
Legofan431 On

I am working in a club where we build robots with Mindstorms for multiple years now, and I am sure that's it's not possible to read the color of a light with a color sensor, neither with the ones from the EV3 set nor the NXT ones.


Here's why: The color sensor works by emitting a light onto a surface, and based on how much of which color is absorbed by the surface, it can determine the color of the object by the light being reflected. However, when you put the color sensor up to a colored light, it shines right into the sensor-portion of the color sensor (the other portion being the LED), making it assume it sees a completely different color. The Color Sensor from Lego Mindstorms kits is simply not capable of doing what you demand.