I'm trying to use the Arduino to trigger an 4n25 optocoupler,
I connected:
pin 1: 3.3v Arduino.
pin 2: ground
pin 5: 9v battery.
pin 4: LED.
(component datasheet here: http://www.datasheetdir.com/4N25+Optocouplers)
I expected the LED to light, but it didn't.
Did I make a wiring mistake or is it a more general mistake understanding how this should work?
Your connections look correct to me. What are the resistor values? (the colours don't show up very well in the photo). Have you connected the LED the right way round? Does the LED light up if you short pins 4-5 of the 4N25?
Yeah it looks like that because of the photo angle, but it's actually in there.
I just found the problem: The breadboard was faulty.
I moved the whole thing exactly as it was to a different breadboard and now it works smoothly XD.