Help with a OPB704W object sensor

Thanks for your response! I was thinking the sensor was an analog device hence use the analog in. Wasn't sure if it would ok to use another input, but seeing the code I understand what you are saying. I am only concerned with reading the time between two light phases. Again thanks for your time!!