Sense RGB values

Ok for a simple robot, I want to be able to sense the RGB value of the reasonably near environment.

I see that CMUCam2 can output RGB values, but that's way overkill for what I want.

A few people seem to use three LDRs, with one covered with red filter, one with a blue filter, one with a green filter. Others use one LDR, and flash red, green and blue LEDs in turn at a surface, and measure the three responses. I assume this only works for close proximity items.

Has anyone tried the three filtered LDRs method? Or are the any alternatives out there for what is essentially a 1-pixel camera?

Thanks

Alex

Hey!

I did the one with 3 diffrent colored LED's and one photoresistor with Lego Mindstorms once (a long time ago) and it worked quite well! If Lego Mindstorms can do it, then I'm sure Arduino will excel at it! :wink: Also, I would think it practical to do this 'cause you use 3 digital lines and only one analog line, as opposed to using 1 digital line and 3 analog lines with the "three LDRs" option.

Oh, and yes, in my (rather limited) experience, the "1 LDR, 3 LEDs" option at least does not work at a distance. Perhaps the "three LDRs" option would, but you'd have to find a way of focusing the point they "look at" or they would just take a general reading of all light headed their way instead of the point/object in front of it.

Confuse.. err Corrent me if I'm wrong! :wink:

Cool, thanks for the reply.

Good to know that the 3 LED version is feasable. I would definately go down that path if I was doing colour sorting, eg the M&M sorter projects that went around a while ago.

What I'm more looking for though is for my roving robot to head towards or generally take an interest in objects in the room that are close to a chosen colour.

Sounds like I should be giving the three LDRs a go.