LED hardly light up with 4n35 optocoupler

Hi
I have tried to wire up a circuit according to this fritzing example
http://fritzing.org/media/projects/o/p/t/optocoupler/images/optocoupler_Optocoupler_1.jpg

But I'm using arduino as powersource on both sides (batteries are on charging at the moment)
First I didn't thought it was working at all, but when I look closely I can see that the LED light up very, very little.
I use 220 ohm resistors on both places.

I've tried different optocouplers with the same result (all 4n35)

So what am I doing wrong?

Best Regards
Niclas

Never mind
The problem was in the code, I forgot to put pinMode() in the code

So now my code is:

const int cameraShootPin=11;

void setup(){
  pinMode(cameraShootPin, OUTPUT);
}
void loop(){
digitalWrite(cameraShootPin,HIGH);
delay(2000);
digitalWrite(cameraShootPin,LOW);
delay(1000);
}

Stupid mistake, hope it helps someone else in the future :stuck_out_tongue:

Hi, many many people made that mistake in the past, but that did not help you :wink: