the IR Led has a polarity. You need to connect the + to the long pin, and the - to the shorter pin (ofcourse with a resistor).