Light Curtain

Hey everybody. I have an issue with programming an Arduino Mega board. Here's what I have: a light curtain(made of 2 phototransistors and 2 IR beams) and a 3 Degrees of freedom robot. I want to condition the movements of the robot to the return of a logic "1" of the light curtain. My question is...how can I create some sort of a sub-program that will return a 1 or 0 from the light curtain to my main program so that I could use it as a condition further in the program. I have to mention I am a beginner in programming :| Thanks ;)

Might have posted it in the wrong place:|

I think your going to have to explain your task/problem is a more clear manner. Light curtain means little to me and it goes down hill from there. Why don't you try again. Also it's not clear if you are asking a software question or a hardware question, or maybe both?

Lefty