There are many different kinds of photo sensor - do you have a link to the datasheet for the one you are using?
There is a pretty extensive Photocell tutorial link on that same product page. Probably far more detailed we could give you in a forum post. Try working through that tutorial and ask questions based on that work.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16