I/O between arduinos with opto coupling. Sample schematic

Collector saturation @ I(f)= 10 mA (R = 380 ohms)