Help for an high and low on a pin

Did you set pin 7 to be an output?

Is the IR enabled?

What data type is code?

I would not have had to ask had you posted the code properly. Read the forum guidelines to see how to properly post code and some good information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.