Push Pull setup for LED

How are you going to synchronise the receiver with the transmitter?
Also the loop does not appear to be symmetric in that you don't have a delay after setting the value of power4 so the value of power1 of the current group will be the same as that of power4 of the previous group.

Also to test the response of the photo diode or photo transistor to the light levels generated by the transmitter you have to have a separate sketch which prints out the analog values say every 50ms.