Universal remote using ir emmiter

Please post your code in "code tags", by using this button:
image
Before doing that, ensure the code is correctly formatted. You can format your code in the IDE using this option:


Your code expects the output pin of the IR receiver to be on pin 11

Hopefully you didn't wire it to pin 2 as shown in the image of how I wired it up. If you did wire it to pin 2 then change the code to use 2 rather than 11.
If you want further help, please post an image of how you connected the receiver to your Arduino. The picture will need to clearly show which pins of the receiver are connected to which sockets on the Arduino.
[Edit: Why are you including ir_Lego_PF_BitStreamEncoder.h?. You should only need to include IRremote.h. It's possible that including the Lego file is interfering with the correct operation of IRremote.h.]