I put the code into funcitons to make it more readable. Also, I added the shell for the right sensor code. The only problem is that the light is on before it is in close proximity to the wall. I'll change the threshhold value to find the optimum value after I set up the right sensor.