HELP with Infrared emitter + sensor problems

I did not put delays into the code I provided and I do not recommend you change the code randomly without understanding exactly why you are doing it. Perhaps you can explain exactly WHY you want to 'pulse' the IR LED?

If you are at a strange house and you want to see what light switch does what you flip the switch on and off, perhaps a few times, and look for any light changes. If you look out the window, close your eyes, start flipping the switch madly up and down, then put it back in the initial position and look again you will not sense any light changes, no matter how quickly and how long you flip the switch up and down.