IR LED without resistor nano

markyj:
Im not sure I quite understand how it is i risk frying either if the led is rated 50ma but the ardiuno only provides 40ma.

You misunderstand. Nothing limits the current out of the Arduino pin. That is the purpose of the resistor. Without the resistor the Arduino will provide whatever current you ask it to. You could try to draw ten amps through it. But anything more than 40mA will burn it up. Your LED wants to draw 50mA. So you're risking burning up the pin on the Arduino. Arduino is going to try to deliver 50mA and in the process will burn itself up.

We don't suggest the resistors because we are in the resistor business. You really do need it. Lots of really smart electronics folks around here. We're not bullshitting you. You really do need that resistor.