There are a few examples of how to use the sensor with the BASIC Stamp 2 available from the web site; along with some sample code and articles. Here is a link for your convenience, the materials will be under Downloads & Resources. I hope this helps,
I found this website to be particularly helpful. Basically, you just need to flash a colored LED at an object and read the RCTime value. You will find that using a Red LED will result in a lower RCTime value for red colored objects as oppose to a blue objects because more "light" is reaching the photoresistor since the red object reflects red light and absorbs all the others (in short objects with the same color as the LED that you use will result in a lower RCTime value than objects with a different color). The article spells it out better, but that is the general idea. One limitation with this is that it works at short distances.
Comments
There are a few examples of how to use the sensor with the BASIC Stamp 2 available from the web site; along with some sample code and articles. Here is a link for your convenience, the materials will be under Downloads & Resources. I hope this helps,
TCS230-DB:
http://www.parallax.com/Store/Sensors/ColorLight/tabid/175/CategoryID/50/List/0/Level/a/ProductID/429/Default.aspx?SortField=ProductName%2cProductName
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
www.societyofrobots.com/sensors_color.shtml
Post Edited (dw101s) : 9/13/2009 11:27:13 PM GMT