My first project: colour-based marbles sorting machine

Retroplayer:
Then use the CDS cell or photodiode connected to an arduino pin.

I meant "...connected to an analog pin."