From various example on how to use optocouplers ( eg 4N25) I gathered that they work in inverted way meaning that for the optocoupler to output a signal, the input LED must be OFF.
This is very easy to process by code as I just need to use digitalWrite LOW instead of digitalWrite HIGH to activate the output of the optocoupler.
My problem is that when I reboot the arduino, the optocupler LED goes OFF and thus activate the ouput of the optocoupler for a few seconds until the code is loaded on the arduino.
How can I prevent this behavior ? Should I connect the optocoupler in a non inverted way ? ( And if so how ? ). Should I use an inverter ?