Now I want to separate the two circuits with a 4N35 optocoupler in case the camera flash trigger voltage exceeds 5V.
So I use the same code and the following circuit.
When I test it with a 4.8V battery through a momentary switch it works fine.
But when I connect it to the camera flash port it doesn't work.
Hi,
The internal pullup resisitance may nt be low enough for the opto transistor.
Place a 10K or 4K7 resistor from digital inout to 5V.
Don't forget the logic is reversed, a pulse from the camera will now cause a low on the digital input.
Grumpy_Mike:
Are you sure you get a voltage output and not just a contact closure?
I think you're be right, it looks like it's just a switch!
Couldn't measure any voltage, just a tiny fluctuation ~6-7mV, but I thought it was because my crappy meter was too slow to measure the pulse.