OPTOCOUPLER 4N25

someone worked with an optocoupler 4N25?

Yes I work with that.What is the problem?I use that on digital outputs to protect arduino outputs.

I would like to know a function that saves the state of the coupler (HIGH, LOW); I thought the digital Write, but do not know ....

pc_demo: I would like to know a function that saves the state of the coupler (HIGH, LOW); I thought the digital Write, but do not know ....

To save anything use a digital read and put the result in a variable. There is nothing special about an opto isolator in this respect. Are you using it as an input or an output to / from your arduino?

I am using as an input

Then wire up the collector to the input, the emitter to ground and when setting the pin mode to input enable the internal pull up resistor.
You then treat it like any other input in the software.

thank you