Added code for Photo Interrupter