Understanding and using infrared signals from a remote control via an Arduino and an IR sensor

The used infrared light sensor In the previous articles on measuring IR pulses and controlling equipment with an IR LED we learnt how our Arduino can help us retreiving the pulses from a remote control and using in later together with an infrared light source. Now we want to understand how the code works, so that we can set up our own machine that can be controlled with an infrared remote control. For this we have to have a closer look on the pulse sequence and how infrared equipment communicates.