Use LEDs, laser diodes, photodiodes, image sensors, optocouplers, displays, and fiber links. Design current drivers and optical receivers while accounting for sensitivity, speed, safety, and ambient light.