Optocoupler
Optocouplers and buttons
Perhaps you want to control a television or a music player, or drive a remote control
car. Most electronic devices have a control panel with buttons, and many of those buttons can be
hacked so that you can "press" them with an Arduino.
Optocouplers are integrated circuits that allow you to control one circuit from a different one without
any electrical connection between the two. Inside an optocoupler is an LED and a light detector. When
the LED in the optocoupler is turned on by your Arduino, the light detector closes a switch internally.
The switch is connected to two of the output pins of the optocoupler. When the internal
switch is closed, the two output pins are connected. When the switch is open, they're not connected.
This way, it's possible to close switches on other devices without connecting them to your Arduino.