Figure out an if else

Here's the webpage I got the sensor from, there a multiple links, including the place where I got the code. SparkFun Line Sensor Breakout - QRE1113 (Digital) - ROB-09454 - SparkFun Electronics
What I am trying to figure out is how to communicate to valves to turn on when this operates. Basically this device says nothing is being reflected at over 3000, hence why I wanted it to be less than 3000, because I want any obstruction to turn on the valves. So the original code doesn't have an if/else statement. I was just posting an example. Pinfive wasn't written by me. I wanted to know what to put in pinfive's place on the if/else statement based on the original code that makes the IR sensor work. The way the system should work, is that whenever there is something causing an obstruction in the IR sensor's path, then the valve will turn on, if nothing is in it's path then the valve will be off. I had it on Basic, but the sensor didn't want to cooperate so I am trying to do arduino. Sorry if this seems complicated, it's hard for me to jump from one type of coding to the next. But I appreciate your help.