Dear marco_c sir, I'm also trying the TCS3200 color sensor to recognize the color of paper which was printed by ink printer. I used your library to calibrate and test it. I also made a quick shield to prevent the external light by your recommandation. I tried two kind paper. One is normal paper for copy machine, the other is for photo printing. Below is my color sample which I assigned the specific windows RGB number to each color. But the result is a little bit far from windows RGB number. My question is if the material of paper couldn't be changed. how should I change the setting to let the result from sensor to match the color sample I printed?
I notice that your sensor shroud is made from the same white plastic material as the rest of the sensor holder. Have you tried to make the sensor shroud black. The surrounding ambient will influence what the sensor reads so if you have a color (ie, anything with RGB values greater than 0) you will find that the shroud will contribute to the color reading from the sensor. Black is RGB (0,0,0), so the contribution will be minimal.
The sensor needs to be calibrated for the situation/environment in which you are using it. Once this is done, you can either build the calibration parameters into your code or save them to EEPROM (you need to write this code).
If you change the environment around the sensor (background, shroud, voltage, etc) then you should recalibrate.
Also look at the colour recognition example as that one produces a header file to include with the code, printed to the serial monitor. That may be quicker for you.