Arduino not sensing Optocoupler Signal

pylon:
I guess the speed is not relevant here (BTW, half a second is definitely very slow!) but the input resistor (10k) is to big to get enough current flowing through the LED. Try to replace that by 220Ω resistor. Remove the 1k resistor to GND after the first optocoupler but increase the 50Ω resistor to 150Ω.

I currently don't see a reason for two optocouplers here. Did you forget anything in the diagram that's relevant?

I have RG LEDs and TS5A3159ADBVR spdt switches in my circuit basically the outcome of if the wire passes or fails will light the LEDs red or green. Without any optocouplers the whole this works fine.

22551480_10209545281619591_1314654925_n.jpg