Just wanna ask if an IR & Photransistor works well in scanning 2 colors red and blue and can differentiate it from one another, i tried using LDR together with a RGB leds, but the data is unstable it changes everytime we make a movement to the box. Maybe an IR would make it simpler it doing the same job as the LDR based sensor.
Try splitting your incident beam* and using the "split"portion as a reference. Variations in the emission intensity may be what's screwing you up. John
*Edmund's Scientific used to sell such splitters. They are basically just front-surface mirrors.