Infrared light has been used quite a lot for many different applications in many fields, one of them is communication, specifically between remotes and domestic devices, what allows us to control them without leaving the comfort of our sofa.
The process of communication between an emitter (the remote) and a receiver (the device) starts when the user presses any button of the remote, this device has an oscillator and a preconfigured chip that allow the signal to adopt a square waveform with a frequency of 39kHz, depending on the button pressed, the chip will use a determined signal code.
This signal travels through the circuit until it reaches the infrared LED, which transforms it into a series of pulses of invisible light (~940nm). If any sensor it's in it's range those pulses will be transformed into a quadratic wave that will indicate what to do according to the programming of the device.
To create a remote we want to capture those pulses, which will have a certain amplitude in time, we also want to know the time between those pulses so we can reproduce those pulses with voltage and time as the only variables.