Detecting IR Remote Button Presses for Specific Channel:
To retrieve full information (including Channel) for the IR Remote Control’s button presses, one may use the Raw Red and Raw Green data readings. This data reading provides full information for the IR physical remote button presses including information about the selected channel on your remote control. It works even when buttons on multiple remotes for different channels are pressed at the same time. This scheme allows multiple IR Remotes (each of different channel) to be used in the same environment at the same time.
Button press values for channel 1 (higher bytes) and 2 (lower bytes) are combined and stored in the raw Red data value. Button presses for channel 3 (higher bytes) and 4 (lower bytes) are stored in the raw Green data value. To retrieve the data, the raw Red or Green value will first need to be reduced to the 0 to 256 range first. Then you will grab the higher bytes or lower bytes using this formulas: