This sketch converts PWM signals from a RC transmitter to IR signals that are compatible with the LEGO Powerfunctions protocol. The PWM signals from any typical RC receiver are converted and get transmitted by an attached IR diode which communicates with a Lego Power Functions IR receiver brick. It fully supports proportional control on all channels.