To feed an opto-coupler you only need one pin, feed the LED from the pin via a current limiting resistor, and connect the other side of the LED to 0V. When the pin is high the LED is on, when it's low the LED is off. You can also do the opposite, reverse the LED and connect it to 5V rather than 0V, then it will light when the pin is low, and go out when it's high.1Steveo said:I just proagram my first microprosser. I was going to use an optocupler " to trigger a camera.
Can I just make two of the micro's pins go low and ack like a switch?