I want to sense the color green (e.g. so a LED lights when the sensor is shown something green).
I am using the following code and it seems to work (spits out numbers which change when I cover the sensor with my hand) but the red, green, blue and clear numbers printed to the serial monitor all seem to change by the same percentages whatever color I show the sensor. I have tried to tweak the gain settings, etc. but no luck so far. I was expecting the green output to increase in relationship with the other color numbers when the sensor is shown a green object such as a leaf.
I level shifted bidirectionally all the inputs and outputs as suggested elsewhere. It seems to be working but just not differentiating between different colors. Bad sensor or am I missing something? Should I use a green filter?
The code is too large to post here so I put a copy in dropbox:https://www.dropbox.com/s/s6b66vbarfsctw1/color_sensor.ino?dl=0
Google "TCS3414 spec" for the sensor specification.