TCS3200 Colour sensor motor control

Hi am i trying to use the above sensor to control a motor depending on the colour detected. I have the motor control and sensor circuit working separately i just cant get them to work together, I want the motor to go one way if one colour is detected and the other if a different colour is detected. if anyone can help that is much appreciated

I have the motor control and sensor circuit working separately

That is always a good start

i just cant get them to work together

What, exactly, is the problem? This is too imprecise for anyone to help you with.

I want the motor to go one way if one colour is detected and the other if a different colour is detected.

At least you know what you want it to do.

if anyone can help that is much appreciated

Not with the information you have provided so far.

You will get more helpful advice if you can show that you have tried something, post your code (using code tags </> in the post edit controls) and be specific about what is not working/the problems you are having.