by robosang » Thu Nov 15, 2012 9:13 am
Try verify your program using push button, is the photo diode digital? If it is analog, use a potentiometer/variable resistor to replace it. Play around with the potentiometer and push button with your program, if the program does not response correctly, you need to debug the program, reduce the complexity of program until it works. Only after that, add more code and verify again.