250mA from an Arduino Pin

That made me realize that I should probably use a resistor with an opto-isolator as well, right? Somehow I missed that before, even I knew that I should use resistors with LEDs and the other half an opto-isolator is a LED.

For some reason the circuit and Arduino Nano still seem to work after few months, but I don't want to push my luck any futher.

I checked the opto's (sharp pc817) datasheet. I am not sure if I got the terms right, but the parameters I used to calculate the resistor value was the typical forward voltage 1.2V @ 20mA (max rating for the forward current is 50mA). That led to resistor value (5V-1.2V)/0.02A = 190ohm. 220ohm is closest I have. Does that sound reasonable?

Btw, this might be a silly question but here it comes anyhow: It doesn't matter which side (anode or cathode) of the LED the resistor is, does it?