First, lets state our goal:
We want a robot to drive to dark areas while avoiding stuff on the way using various sensors.
As with everything, we break it down into smaller pieces. We test each one individually, record any numbers we get (ADC readings and the like) and then start putting them together. While doing each of these tests individually, it helps us figure out how we are eventually going to put them together.
If someone told me to accomplish the goal above, I would do it just like this: