How to send PULSE_WIDTH IR data?

It looks like you might be over driving your LED. The datasheet says 100mA at 1.6V and you are supplying 3.3V (minus a couple of tenths of volt drop across the transistor). Better get a resistor in there or it might not last long. It also wouldn't hurt to put a resistor between your bin and the base of that transistor to limit current.